Question discussion

Which method is used to loop through all the enumerable properties of an object in JavaScript?

358856Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which method is used to loop through all the enumerable properties of an object in JavaScript?
  • AObject.values()
  • BforEach()
  • Cfor...in
  • DObject.keys()
Correct answer: C

Explanation

The for...in loop goes through all the enumerable properties of an object in JavaScript.

Discussion 0

Nobody has replied yet. Start the discussion!