let obj = {
id: 94801287,
name: "Albus Dumbledore",
academicrank: "Professor"
};
const reversedKeys = Object.keys(obj).reverse();
console.log(reversedKeys);
reversedKeys.forEach(key => {
console.log(key, obj[key]);
});
/*
run:
["academicrank", "name", "id"]
"academicrank", "Professor"
"name", "Albus Dumbledore"
"id", 94801287
*/