Answers for "js run over class items"

53

javascript loop over class

var person={
 	first_name:"johnny",
  	last_name: "johnson",
	phone:"703-3424-1111"
};
for (var property in person) {
  	console.log(property,":",person[property]);
}
Posted by: Guest on July-22-2019
1

javascript loop over class

var myElements = document.getElementsByClassName("some_class_name");
for(var i = 0; i < myElements.length; i++){
	console.log(myElements[i]);
}
Posted by: Guest on July-30-2019

Code answers related to "js run over class items"

Code answers related to "Javascript"

Browse Popular Code Answers by Language