1var person={
2 first_name:"johnny",
3 last_name: "johnson",
4 phone:"703-3424-1111"
5};
6for (var property in person) {
7 console.log(property,":",person[property]);
8}
1const object = {a: 1, b: 2, c: 3};
2
3for (const property in object) {
4 console.log(`${property}: ${object[property]}`);
5}
1//Loop thru DOM elements
2
3var all = document.getElementsByTagName("*");
4
5for (var i=0, max=all.length; i < max; i++) {
6 // Do something with the element here
7}
1 Array.from($('.'+$( this ).attr('id'))).forEach(function(obj){
2
3 console.log(obj);
4 });