• Post author:
  • Post category:Blog
  • Reading time:1 mins read
  • Post last modified:June 12, 2024

Which of the following loop instructions is intended only to loop through all the keys of the indicated object?

  • for ... of 
  • if ... else 
  • for ... in 
  • do ... while
Explanation & Hint:

The loop instruction intended only to loop through all the keys of the indicated object is the “for … in” loop. The “for … in” loop in JavaScript is used to iterate over the properties (keys) of an object. It allows you to loop through each enumerable property of an object and execute a block of code for each property. The loop variable represents each key in the object during each iteration.

For more Questions and Answers:

JavaScipt Essentials 1 (JSE) | JSE1 – Module 4 Test Exam Answers Full 100%

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments