I was going through Google Documentations of Google's App Script for some web App. Basically I was trying to store simple data in key-value pairs scoped to one script, while I did manage to store and retrieve data but while i was trying to get only the keys, I got an array of keys which is not in order. Here's the code and its logs.
var scriptProperties = PropertiesService.getScriptProperties();
scriptProperties.setProperties({
'cow': 'moo',
'sheep': 'baa',
'chicken': 'cluck'
});
var keys = scriptProperties.getKeys();
Logger.log('Animals known:');
for (var i = 0; i < keys.length; i++) {
Logger.log(keys[i]);
}
Logs:
Animals known:
chicken
cow
sheep
Why Ohh why?