for of vs for in
//for in, iterates keys in an object
var obj={a:1, b:2}
for( var key in obj)
console.log(obj[key]); //would print 1 and 2
//for of, iterates values in array or any iterable
var ar = [10, 11, 12, 13]
for (var item in ar )
console.log(item); //would print 10 11 12 13