Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for in loop in javascript

var car = {"Tesla":"Model 3", "Mercedes":"V-8 Model"};
for(brandName in car){
	console.log(brandName);
}
//Tesla
//Mercedes
for(brandName in car){
	console.log(car[brandName]);
}
//Model 3
//V-8 Model
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #javascript
ADD COMMENT
Topic
Name
3+8 =