const obj = {0: 1, 1: 2, 2: 3, length: 3}; console.log(obj); // {0: 1, 1: 2, 2: 3, length: 3} Array.prototype.reverse.call(obj); //same syntax for using apply() console.log(obj); // {0: 3, 1: 2, 2: 1, length: 3}