JavaScript Object Methods In 90 Seconds #JavaScriptJanuary

Channel:
Subscribers:
296,000
Published on ● Video Link: https://www.youtube.com/watch?v=Oo29U_OAzF4



Duration: 1:20
3,581 views
218


Watch the entire #JavaScriptJanuary series from the beginning!
https://www.youtube.com/playlist?list=PLkwxH9e_vrALlH7D0XLDn2td-uoHqHFxq

In JavaScript there are several methods that can be used to convert objects into arrays. In this video we will cover the Object keys, values, and entries methods. But why would we want to convert an object into an array? There could be many reasons, but one is to make the object iterable. Iterable basically means to loop through.

With an array we have many methods that are not available on objects. Such as .forEach(), .filter(), .map(), .reduce(), and many others.

The first method that we will look at is Object.keys().

If we simply want to get all of the keys then we can use Object.keys() and pass in the object that we want to convert. This will return an array with all of the keys.

Similarly, if we just want to get all of the values, we can use Object.values() and pass in the object that we want to convert. This will return an array with all of the values.

And lastly, if we want to get both the keys and the values we can use Object.entries() and pass in the object that we want to convert. This will return a multidimensional array with both the keys and the values.

By using one of these methods we can now more easily filter or manipulate the data as needed.

I'll be releasing a new video every day in January! Stay tuned..
_____________________________________

๐Ÿ“š Learn to CODE in just a FEW months here:
Treehouse Discount Code: https://treehouse.7eer.net/codeSTACKr
_____________________________________

๐Ÿ› ๏ธ Tools I use:
๐ŸŸ  Theme: https://marketplace.visualstudio.com/items?itemName=codestackr.codestackr-theme
๐ŸŸ  Font: STACKr Code (Exclusive to my VS Code Course - https://vsCodeHero.com)
๐ŸŸ  SuperHero Extension Pack: https://marketplace.visualstudio.com/items?itemName=codeSTACKr.superhero-extensions

๐Ÿšข Deploy for FREE on Vercel: https://vercel.com/ambassadors/codestackr
_____________________________________

๐Ÿ’– Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________

Watch Next:
Web Development - Beginners Roadmap (2020) - https://youtu.be/iogabydg2y0
Playlist: Web Development For Beginners - https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt
_____________________________________

Connect With Me:
Website: http://www.codestackr.com
Twitter: https://twitter.com/codeSTACKr
Instagram: https://instagram.com/codeSTACKr/
Facebook: https://facebook.com/codeSTACKr
_____________________________________

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

#JavaScriptJanuary #31Days31Videos #codeSTACKr







Tags:
JavaScriptJanuary
31Days31Videos
JavaScript
JS
Web Development
Web Dev
Web Development 2020
Web Dev 2020
HTML
CSS
Node.js
Chrome
ES5
ES6
ES7
javascript object methods
js object methods
javascript convert object to array
js convert object to array
convert object to array javascript
convert object to array js
javascript object keys
js object keys
javascript object values
js object values
javascript object entries
js object entries
object entries javascript