JavaScript for-in loop is used to iterate over the properties of an object. See the code snippet:
for-in loop