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