Previous Lecture Complete and continue  

  ES5 - Object.keys

Video Summary:

Object.keys has been a part of Javascript for quite a while but it has become popularized along with the functional movement in the Javascript community.

What it does:

Object.keys is a function on the Object constructor that takes in an object and outputs that objects keys into an array.

Why it's valuable:

Array's have far more useful helper methods and by using Object.keys instead of the traditional for (var key in obj) syntax it is much easier to chain transformational methods to the object in the same way we would do with an array.

18 comments