Friday, 6 September 2013

parseInt duplicates object property in JavaScript

parseInt duplicates object property in JavaScript

After
for(var i=0; i < data.length; i++) {
data[i].dummyProp = parseInt(data[i].dummyProp);
}
i get double property name:
data: Array[1]
0: Object
dummyProp: NaN
dummyProp: ""
Image from Chrome Developer Tools:

Can someone explain that?

No comments:

Post a Comment