Sunday, 4 August 2013

javascript objects keys and values

data = {one:1, two:2, three:3};
for(var key in data) {
console.log(data[key])
console.log(key)
}

No comments:

Post a Comment