1var els = document.getElementsByClassName("myClass");
2for(var i = 0; i < els.length; i++)
3{
4 console.log(els[i]);
5}
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}
1var myElements = document.getElementsByClassName("some_class_name");
2for(var i = 0; i < myElements.length; i++){
3 console.log(myElements[i]);
4}