If I have an object like:
{ \'a\' : \'apple\', \'b\' : \'banana\', \'c\' : \'carrot\' }
If I don\'t know in advance that the list goes up
You could also use the Object.values() method:
Object.values()
Object.values(fruitObject)[Object.values(fruitObject).length - 1]; // "carrot"