In Javascript, there are several ways you can iterate over an object's keys and values. We'll look at for
...in
, which will loop over all the keys (though you may need to also use hasOwnProperty
). We'll also look at three built in object functions: keys
, values
, and entries
.