Currently, I am attempting to iterate through numbers 1 to 21 and then utilize those numbers in order to obtain an Array of Strings like ['e1.wkh',...'e21.wkh']. However, at the moment I am only receiving the value ['e21.wkh'].
function calculateStats() {
var obj = {}
var deviceId = "34534";
for (var i = 1; i <= 21; i++) {
var loo = i.toString();
console.log(loo);
obj[deviceId] = ['e' + loo + '.kwh'];
console.log(obj[deviceId]);
}
}