JavaScript for…in loop

java script

The for…in loop is used to loop through an object’s properties. As we have not discussed Objects yet, you may not feel comfortable with this loop. But once you understand how objects behave in JavaScript, you will find this loop very useful. Syntax for (variablename in object){ statement or block to execute } In each … Read more