Object keys, values, and entries methods
HTML-код
- Опубликовано: 25 июн 2018
- This video covers three Object methods - keys( ), values( ) and entries( ).
All three methods will create an iterable Array from the Object that you can then use in conjunction with other Array and iterable methods.
Code GIST: gist.github.com/prof3ssorSt3v...
MDN Object.keys ref: developer.mozilla.org/en-US/d...
MDN Object.values ref: developer.mozilla.org/en-US/d...
MDN Object.entries ref: developer.mozilla.org/en-US/d...
Dude, straight to the point. Everything I needed, and although simple it was so hard to find it all compiled in one go like that. Go Canada!
I really needed this. Concise, clear, straight to the point, and easy to understand. I don't get why free RUclips videos break down concepts way better than courses I had to go and pay for. Thanks a lot.
Steve, you helped me solve in 2 minutes what I have spent the last hour on. THANK YOU!
Wow man, that was really very great! Thank you a lot. I've been looking up tutorials on the subject for the whole day... And this tutorial here is the best by far :)
I didn't think I even needed any further clarification on objects and arrays until I came across this video. This was perfectly explained.
Great explanation. Thanks a lot
I wasn’t aware of those methods. Great explanation as always!
I'm new to all of this and the way you explain is so clear. Thank you for these videos!
Thanks Steve, you've saved me hours of debugging!
Great tutorial! Straight to the point and well explained.
Super depth in your voice, I like your voice very much it is very pleasant to hear.
Simple yet elegant explanation. Thanks a lot!
Thank you so much Steve! This is very easy to follow and it helps me out a lot!
Well-detailed explanation straight to the point.
Your tutorials seriously provide something one really want to learn. Thank you very much,.
THANK YOU STEVE, this explanation helped so much
Very clear and objective!! Thanks!
Prof, your videos are devoid of fluff. You go straight to applicable functionality. Thanks for making it easier.
Perfectly explained, thank you !
YOUR EXPLANATION WAS WONDERFUL!!!!!
Great Video.
Short and straight forward
Oh god... thank you so much! Great explanation! Following the channel right now
Very clear an concise 👌. Thanks man
Great Technical communication. Thank You! This is a very good Tutorial.
I had to stop the video at 2:35 to come and thank you for your explanation. Straight and precise.Thank you again Steve
Thanks! Please share the channel to help other people too.
Nicely done! Thanks for the education.
probably the best video I've seen on explaining this
Thanks this helped me, love the GOT reference😂
Thanks a lot for the helpful video! Awesome job!
Excellent Video - thank you.
Amazing explanation. Thanks so much!
thank you , great explanation!
Thanks buddy! Great video, gunna subscribe. You have a nice teaching style
simple and great explained! thanks
Another very cool tutorial!
Thx for the video, I was lost as to the difference, and this video made it clear.
very detailed explanation thankyou some much
Thank you so much! Great video!
best video for keys, values and entries., you gained a subscriber.
can't help it, just had to comment this is really good. keep it up
Great tut Steve. 👍
You're a legend, Sir. Thank you so much!!!!
Helped a lot, thanks !
Thanks for the explanation.
Easy explanation . Thank you
great explanation! thanks
So great bro I love those methods
thank Steve , nice explanation!
Great video. Thank you, helped alot!!!
Thank god I know english, because your class was AMAZING, so simply! Thanks
Wow, absolutely amazing 🙏
Thank you, this has help me understand better what .keys and .entries does.
Thank you for making this video
Great explaination thumbs up
I'm going through codecademy at the moment and there are bits that confuse me for various reasons, these videos you've uploaded are helping massively! They have helped me cement so many bits of knowledge in place and I feel like i see clearer afterwards :D
Recommending to all my friends also learning to code :D
Thanks!
Thank you from the heart.
Really very helpful. Thank you so much :)
Great stuff Man
Excellent, Stright to the Point
Greeat job!! Thank you!
awesome Explanation..
Nice explanation .. , 👏👏✌
thanks a lot you are amazing and your explanation was so great and useful :)
Amazing, thank you!
Great Explanation Brother! You Deserved A Like From ME! Great Teaching Skills For Newbies.
What a great voice!
Great explanation
BTW nice to see a GOT fan
You are a great teacher
brilliant clarifying,,,thanks so muchhh)
great explanation thank you and westeros example it's very nice too :D
that was very helpful
very well explained
Very clear. Thanks @SteveGriffith
Thanks mate.
Thanks Man.
lol I am guessing that you may be a fan of Game of Thrones? Nice explanation of the three functions for object. Thank you so much.
Thank you!
Steve, this work of yours is gold. Truly.
Edit: One doubt though. What if we had an anonymous function as a value of some key inside an object. What happens to that? I'm fairly new to JS and programming in general, but I haven't saw we declaring a function inside an array.
The values assigned to the keys in an object can be anything, including an anonymous function.
Functions in JavaScript are first class citizens. They can be passed around like any variable.
Good stuff.
awesome thanks!
Ty mate ;D
Ty soo much!
i love your videos!
it really helps
Thank you soo much
THANK YOU 👏👏
today I simply learned something interesting from this vidyo. Thanks for uploading.
😍
Very good video 1000 likes for u
Great. useful
thank you so much sir
Thanks man! this was the clarification I just needed!
Great ExplaNATION
How do you change the name of a key. Say, if I wanted to add an ‘s’ character onto the end of keys that held array objects as their values?
You cant change the name of a key. You can create a new key, copy the value of the old key to the new key and then delete the old one.
thanks a lot
FANTASTIC!!! Such a good explanation. Thank you very much!
As good as always - just one line - "these method will create array from Object then we can ... " - cleared my doubt, when I saw in few places map method is used after Object.entries - it created confusion.
Aren't these ES8 methods ?
Thank you so much.
They are ES6 methods. Widely supported.
Could you give any advice on how you'd access a specific entry without knowing the index number? Like if you were wanting to log 'Snow' without knowing it is [2][1], but you knew the key was 'jon'.
The key concept is accepting the fact that objects are not built with sequential properties. There is no number associated with the properties. Object.keys() gives you a list of the possible properties. Don't think of it as the order of properties.
Thanks sir
This is great. How about other types of operations that could be done using an object like this?
For example working with arrays against an object. How did it work superficially and under the hood?
Thx
I have a whole playlist about Arrays - ruclips.net/video/arIhhRd1RPc/видео.html
If you search for the keyword "Object" on my channel you will find a bunch of other related videos too.
@@SteveGriffith-Prof3ssorSt3v3 I'll go and look for the. I found code that goes like this let obj = {}:
Let arr = ('a','b,'c');
And at some point in a loop they go like this this obj[arr[i]] . I was wondering, in gullible mode, if this a multiplication of some sort. I.e A*B(i)??I??? 🙂
@@jaimedpcaus1 Not multiplication. Nested looping. ruclips.net/video/AqgVLYpBWG8/видео.html
So say we convert an object to an array so we can use methods on it easier. After doing this, how would we convert the newly updated array back into the object that it came from?
We wouldn't. We would have the original object plus the new information we got from the array methods.
Dock Adams if it's a two dimensional array, then we can use the Object.fromEntries(arr) to convert back to object