I was trying to convert alphabets into ASCII using the following:
var subArr = [["S", "E", "R", "R"], ["C", "V", "M", "M", "N", "!"]];
for (var i in subArr) {
var newStr = subArr[i].map( function(val) {
return val.charCodeAt()
})
}
console.log(newStr)
But it seemed that only the second subarray was converted while the first one was not even considered. Would anyone please help me understand the issue here?