Skip to content

Tag: for-in-loop

Implement condition in loop

I am looking at tutorial from MDN documentation…in The example iterates over the object’s properties and prints all. I am trying to print only if value of object’s property is 3. Can someone please help me understand where I am going wrong. And also if possible explain. Answer for…in loops can’t have conditions.ยน You have to implement the