Entries in Order

We reorder the entries from an object then construct a new object to see if it prints in the revised order.

var alpha = {a:5,b:2,c:7,d:1} var entries = Object.entries(alpha) entries.sort((a,b) => a[1]-b[1]) Object.fromEntries(entries)

In the frame below we can view the results.

http://js.ward.asia.wiki.org/assets/pages/snippet-template/basicjs.html?snippet-template HEIGHT 200