Object keys, values, and entries methods

  Рет қаралды 98,914

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

Пікірлер: 170
@guiguitoLemon
@guiguitoLemon 5 жыл бұрын
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!
@daeroi3116
@daeroi3116 3 жыл бұрын
I really needed this. Concise, clear, straight to the point, and easy to understand. I don't get why free KZbin videos break down concepts way better than courses I had to go and pay for. Thanks a lot.
@kris8536
@kris8536 4 жыл бұрын
Steve, you helped me solve in 2 minutes what I have spent the last hour on. THANK YOU!
@IbifubaraAduonye
@IbifubaraAduonye Жыл бұрын
Prof, your videos are devoid of fluff. You go straight to applicable functionality. Thanks for making it easier.
@TheMCVR
@TheMCVR 5 жыл бұрын
Super depth in your voice, I like your voice very much it is very pleasant to hear.
@vladimirzizic6874
@vladimirzizic6874 4 жыл бұрын
I didn't think I even needed any further clarification on objects and arrays until I came across this video. This was perfectly explained.
@staffordokoth5851
@staffordokoth5851 3 жыл бұрын
I had to stop the video at 2:35 to come and thank you for your explanation. Straight and precise.Thank you again Steve
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Thanks! Please share the channel to help other people too.
@calebcadainoo
@calebcadainoo 3 жыл бұрын
Very clear an concise 👌. Thanks man
@catetodev5998
@catetodev5998 2 жыл бұрын
Thank god I know english, because your class was AMAZING, so simply! Thanks
@vladislavbarbarii2089
@vladislavbarbarii2089 6 жыл бұрын
Great explanation. Thanks a lot
@rachelbourne5338
@rachelbourne5338 3 жыл бұрын
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
@rachelbourne5338
@rachelbourne5338 3 жыл бұрын
Recommending to all my friends also learning to code :D
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Thanks!
@jd_flick
@jd_flick 3 жыл бұрын
probably the best video I've seen on explaining this
@robertreimann1846
@robertreimann1846 4 жыл бұрын
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 :)
@pasej5
@pasej5 Жыл бұрын
best video for keys, values and entries., you gained a subscriber.
@jessicarodrigues-dlouhy575
@jessicarodrigues-dlouhy575 2 жыл бұрын
YOUR EXPLANATION WAS WONDERFUL!!!!!
@jase9389
@jase9389 8 ай бұрын
Thx for the video, I was lost as to the difference, and this video made it clear.
@cjm101
@cjm101 3 жыл бұрын
I'm new to all of this and the way you explain is so clear. Thank you for these videos!
@rotrose7531
@rotrose7531 4 жыл бұрын
Your tutorials seriously provide something one really want to learn. Thank you very much,.
@Jeff-2112
@Jeff-2112 6 жыл бұрын
I wasn’t aware of those methods. Great explanation as always!
@soyaro
@soyaro 5 жыл бұрын
Thanks Steve, you've saved me hours of debugging!
@johnsonogbu8697
@johnsonogbu8697 2 жыл бұрын
Great Video. Short and straight forward
@javxa
@javxa 2 жыл бұрын
Simple yet elegant explanation. Thanks a lot!
@mohammadrifakat7
@mohammadrifakat7 Жыл бұрын
today I simply learned something interesting from this vidyo. Thanks for uploading. 😍
@benidibatia8918
@benidibatia8918 4 жыл бұрын
Well-detailed explanation straight to the point.
@BestFoodReviewFeatured
@BestFoodReviewFeatured 3 жыл бұрын
Thank you, this has help me understand better what .keys and .entries does.
@ChrisTian-ox5nr
@ChrisTian-ox5nr 4 жыл бұрын
Great Technical communication. Thank You! This is a very good Tutorial.
@mishanwong2393
@mishanwong2393 4 жыл бұрын
Thank you so much Steve! This is very easy to follow and it helps me out a lot!
@divyanshchoukse5454
@divyanshchoukse5454 2 жыл бұрын
Great explanation BTW nice to see a GOT fan
@martingustafsson3828
@martingustafsson3828 5 жыл бұрын
Great tutorial! Straight to the point and well explained.
@harsh_here
@harsh_here 3 жыл бұрын
You're a legend, Sir. Thank you so much!!!!
@SrtaNatyOliveira
@SrtaNatyOliveira 5 жыл бұрын
Oh god... thank you so much! Great explanation! Following the channel right now
@danielaparicio3692
@danielaparicio3692 5 жыл бұрын
THANK YOU STEVE, this explanation helped so much
@madeyeatreides4055
@madeyeatreides4055 6 жыл бұрын
Thanks this helped me, love the GOT reference😂
@erickchavez4551
@erickchavez4551 Жыл бұрын
Amazing explanation. Thanks so much!
@tathagat9586
@tathagat9586 2 жыл бұрын
Wow, absolutely amazing 🙏
@anshulmanapure1980
@anshulmanapure1980 3 жыл бұрын
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.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
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.
@chesterxp508
@chesterxp508 3 жыл бұрын
Another very cool tutorial!
@rn2782
@rn2782 Жыл бұрын
simple and great explained! thanks
@vcnswamy8461
@vcnswamy8461 Жыл бұрын
Excellent, Stright to the Point
@beccaadolph
@beccaadolph 4 жыл бұрын
Excellent Video - thank you.
@ademolaadeagbo9011
@ademolaadeagbo9011 5 жыл бұрын
can't help it, just had to comment this is really good. keep it up
@tonykieling7664
@tonykieling7664 6 жыл бұрын
Very clear and objective!! Thanks!
@kranthikumar5215
@kranthikumar5215 3 жыл бұрын
You are a great teacher
@chrislopez9665
@chrislopez9665 3 жыл бұрын
Thank you so much! Great video!
@adziiia1
@adziiia1 4 жыл бұрын
thank Steve , nice explanation!
@josephgarza5973
@josephgarza5973 3 жыл бұрын
Thanks a lot for the helpful video! Awesome job!
@coffeeisthepathtovictory1290
@coffeeisthepathtovictory1290 2 жыл бұрын
Thank you for making this video
@mezianibelkacem650
@mezianibelkacem650 2 жыл бұрын
great explanation thank you and westeros example it's very nice too :D
@claystation6360
@claystation6360 5 жыл бұрын
Thanks buddy! Great video, gunna subscribe. You have a nice teaching style
@sureshanands8594
@sureshanands8594 5 жыл бұрын
Nice explanation .. , 👏👏✌
@jp-hz6br
@jp-hz6br 4 жыл бұрын
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?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
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.
@nedlathium9492
@nedlathium9492 5 жыл бұрын
Perfectly explained, thank you !
@Wwllmm_
@Wwllmm_ 2 жыл бұрын
Helped a lot, thanks !
@codeymaze.
@codeymaze. 3 жыл бұрын
Easy explanation . Thank you
@suvendubiswal6820
@suvendubiswal6820 2 жыл бұрын
Very good video 1000 likes for u
@artsenm1327
@artsenm1327 6 жыл бұрын
Great tut Steve. 👍
@DeepakSingh-oj9ot
@DeepakSingh-oj9ot 4 жыл бұрын
awesome Explanation..
@alexsilva820
@alexsilva820 5 жыл бұрын
So great bro I love those methods
@davidgriffin7632
@davidgriffin7632 2 жыл бұрын
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'.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
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.
@MuhammadSamiViewer
@MuhammadSamiViewer 4 жыл бұрын
Great Explanation Brother! You Deserved A Like From ME! Great Teaching Skills For Newbies.
@bribes_for_nouns
@bribes_for_nouns 4 жыл бұрын
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?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
We wouldn't. We would have the original object plus the new information we got from the array methods.
@KishoreKumarmaistry
@KishoreKumarmaistry 4 жыл бұрын
Dock Adams if it's a two dimensional array, then we can use the Object.fromEntries(arr) to convert back to object
@GauthamHC99
@GauthamHC99 2 жыл бұрын
Really very helpful. Thank you so much :)
@christmasvillage3652
@christmasvillage3652 5 жыл бұрын
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.
@Thestorbob
@Thestorbob 8 ай бұрын
Amazing, thank you!
@shawnwright4275
@shawnwright4275 Жыл бұрын
Very clear. Thanks @SteveGriffith
@jordancoakley4832
@jordancoakley4832 4 жыл бұрын
Great video. Thank you, helped alot!!!
@slimyelow
@slimyelow 4 жыл бұрын
What a great voice!
@tutorsploitlearners2434
@tutorsploitlearners2434 Жыл бұрын
very well explained
@muhammadashfaq913
@muhammadashfaq913 5 жыл бұрын
Great explaination thumbs up
@nasirshaik2662
@nasirshaik2662 6 жыл бұрын
very detailed explanation thankyou some much
@SergioTortosa60m32
@SergioTortosa60m32 5 жыл бұрын
Thanks for the explanation.
@olawaseem
@olawaseem 5 жыл бұрын
Thank you from the heart.
@mustafaalawad2667
@mustafaalawad2667 6 жыл бұрын
thanks a lot you are amazing and your explanation was so great and useful :)
@kalishamalama5805
@kalishamalama5805 5 жыл бұрын
Great stuff Man
@Martin-sy4jt
@Martin-sy4jt 3 жыл бұрын
THANK YOU 👏👏
@courtneybk9428
@courtneybk9428 8 ай бұрын
i love your videos!
@milanm9907
@milanm9907 6 жыл бұрын
thank you , great explanation!
@spetsnazGru487
@spetsnazGru487 4 жыл бұрын
if you create an array, you have a .entries method with that array, how to use that. When i logged in console, it says iterable array.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
When you call the entries( ) method what you get is an array of arrays. Each of the inner arrays has two items - the key and the value. the key is item [0] and the value is item [1].
@spetsnazGru487
@spetsnazGru487 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 thank you very much.
@aidangasim
@aidangasim 4 жыл бұрын
brilliant clarifying,,,thanks so muchhh)
@abhishekpatil6205
@abhishekpatil6205 2 жыл бұрын
Hey Steve! I think you're one of the die-heart fan of Game of Thrones as I am...🍷 Well, thanks a lot for this tutorial! By the way which is your favorite character in GOT?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
Hard to say. There are many great characters. The Hound, Jorah Mormont, Tyrion, Arya, ...
@abhishekpatil6205
@abhishekpatil6205 2 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Well that's a lot of names, but my favorite forever is ''Tyrion''. 😊 And I'm eagerly waiting for 'House of Dragons'. Hope you are too.
@alexhitchins4339
@alexhitchins4339 4 жыл бұрын
FANTASTIC!!! Such a good explanation. Thank you very much!
@Mrshaider79
@Mrshaider79 5 жыл бұрын
Greeat job!! Thank you!
@kc7718
@kc7718 2 жыл бұрын
Hi Prof.Griffith How do i convert ["3,1", "4,2", "5,10"] into key vals
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
use any loop method you want (array map is best to create a new array from the old), take each string as you loop and call split(",") to break it apart on the comma. Then you have the two parts and can use the first part as the key and the second as the value.
@kc7718
@kc7718 2 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 thankyou appreciate it
@EnzoAuditore
@EnzoAuditore Жыл бұрын
Thanks mate.
@listgaus
@listgaus 4 жыл бұрын
Great explanation, has anyone mentioned you sound just like Tyrion? it felt a bit like im listening to him guiding me trough object methods :P
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
Lol. Haven't heard Tyrion before. Bob Ross, Liam Neeson, Christian Slater, Bryan Cranston, Corpse Husband, Tiger Dad, and lots of others. 😀
@listgaus
@listgaus 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 haha maybe the object's context gave me the reference :P
@elchino7672
@elchino7672 3 жыл бұрын
Hi. Thank you for great esplanation. Question: How add new value in one of these array?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
These arrays are generated by the methods entries, values, and keys. If you add a new property to the object then the methods will return a new updated array.
@elchino7672
@elchino7672 3 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Thank for reply. Steve, I mean if I have an object with multiple arrays and I want to push random into one of these array any value what would be logic? Say, there is object { arr1[], arr2[], arr[] } and I want to push 'some value' into one of these arrays in my object. But I want it to do randomly and each array wont have any dublicates
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
@@elchino7672 That's several different things you are asking. Avoiding duplicates in arrays I talk about here - kzbin.info/www/bejne/q4Wqg32no51rb7M You can also covert to a Set and then back to an Array to remove duplicate values. Picking a random value - kzbin.info/www/bejne/np-ycn9qprxor7s myObject['arr1'].push( newThing ) is how you could add something to the array called arr1 inside of myObject. Here is my whole playlist about Arrays - kzbin.info/www/bejne/l6OsmZuImZaFhsU
@Salmooooon_oO
@Salmooooon_oO 2 ай бұрын
I totally understand, thx
@jaimedpcaus1
@jaimedpcaus1 2 жыл бұрын
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
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
I have a whole playlist about Arrays - kzbin.info/www/bejne/l6OsmZuImZaFhsU If you search for the keyword "Object" on my channel you will find a bunch of other related videos too.
@jaimedpcaus1
@jaimedpcaus1 2 жыл бұрын
@@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??? 🙂
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
@@jaimedpcaus1 Not multiplication. Nested looping. kzbin.info/www/bejne/d6LKh3-PpaeKfZo
@forusanjay
@forusanjay 3 жыл бұрын
how to contruct an object through two different arrays one for key and another for values
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Basically declare an empty object and then use pretty much any kind of loop to loop through the arrays using the same index to point to the matching item from each array. Here is one example. Let's say the two arrays are called `keys` and `vals`. let obj = { }; keys.forEach( (key, index) => { obj[key] = vals[index]; });
@barungh
@barungh 6 жыл бұрын
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.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 жыл бұрын
They are ES6 methods. Widely supported.
@turkialharbi2136
@turkialharbi2136 4 жыл бұрын
Thank you!
@chakravarthykukkala7666
@chakravarthykukkala7666 4 жыл бұрын
Great ExplaNATION
@sterling3419
@sterling3419 2 жыл бұрын
A fellow GOT fan
@SoumyajitMandal
@SoumyajitMandal 2 жыл бұрын
it really helps
@saadsaif97
@saadsaif97 4 жыл бұрын
Thanks Man.
@ThatGuyDownInThe
@ThatGuyDownInThe 4 жыл бұрын
Good stuff.
@surmanikonsam3793
@surmanikonsam3793 2 жыл бұрын
thank you so much sir
@karma_yogi_42
@karma_yogi_42 4 жыл бұрын
awesome thanks!
@sangrammukherjee9495
@sangrammukherjee9495 3 жыл бұрын
Thank you soo much
@FromTheHeart-777
@FromTheHeart-777 3 жыл бұрын
Ty soo much!
Intro to Async and Await
8:08
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 7 М.
Why Is Array/Object Destructuring So Useful And How To Use It
13:24
Web Dev Simplified
Рет қаралды 432 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Easy Ways to Loop Over Objects in JavaScript
11:21
dcode
Рет қаралды 12 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
How to Use the New JS Object GroupBy Method
18:17
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 4 М.
Playing with JavaScript Objects
11:56
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 30 М.
5 MUST KNOW JavaScript Object Functions
10:42
dcode
Рет қаралды 29 М.
Use Maps more and Objects less
5:45
Steve (Builder.io)
Рет қаралды 104 М.
Avoid These BAD Practices in Python OOP
24:42
ArjanCodes
Рет қаралды 82 М.
Learn JavaScript DOM Traversal In 15 Minutes
14:44
Web Dev Simplified
Рет қаралды 229 М.
JavaScript Objects: Shallow and Deep Copy | All You Need to Know in 10 mins!
12:44
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН