JavaScript – Object.keys()

GitHubCodeCommit

Back on the ‘Object.X’ series, we explore Object.keys().  Pretty straight forward, this method takes an object and list all of the keys it contains.  As stated earlier, classic JavaScript objects are key/value pairs like a Dictionary or HashTable.

The sample below gets a list of keys from an array and then displays the key and then returns the value via the key.

screen-shot-2017-02-21-at-8-54-41-pm

Stay tuned!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s