JS Interview - dot notation vs square brackets - Question 12

  Рет қаралды 9,180

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

This episode discusses the differences between dot notation syntax and square bracket syntax.
Full Interview question playlist: • JS Interview - Timeout...
Starter Code GIST: gist.github.co...

Пікірлер: 44
@apex-lazer
@apex-lazer 11 ай бұрын
You are gold. Seriously. You somehow make things click and are so easy and enjoyable to listen to and learn from. ☝️ From the bottom of my heart. Thank you brother 🙏
@MsRamrad
@MsRamrad 5 жыл бұрын
It's a shame that I did not discover your channel earlier. You have a gift for breaking down and explaining concepts really well.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 жыл бұрын
Thanks. Please share the channel to help others discover it
@johnclampet4497
@johnclampet4497 3 жыл бұрын
Just made my life a lot easier... just started in Javascript yesterday I also appreciate the Supernatural reference!
@wambuafredrick6881
@wambuafredrick6881 3 жыл бұрын
The voice instills the knowledge :)
@elilumilay9405
@elilumilay9405 2 жыл бұрын
Such a calm voice. Perfect for a coding professor! :D thank you Steve. I came here after encountering a same topic in freecodecamp
@liberato09
@liberato09 3 жыл бұрын
Wow that was really well explained. thx my dude. your dog ear slapping in the background cracked me up at the end
@abdelmoneimnafea8498
@abdelmoneimnafea8498 5 жыл бұрын
Such an amazing series ... thanks Steve
@aricwilliamsdeveloper
@aricwilliamsdeveloper 4 жыл бұрын
lol wow! professor steve breaks it down like a chiropractor! liked & subscribed
@mattparkinson3954
@mattparkinson3954 3 жыл бұрын
Thankyou for this simplified explanation, really helpful! I shall be subscribing and watching more of your videos.
@leroyal8510
@leroyal8510 3 жыл бұрын
Woah! I love programming and I love SUPERNATURAL too!
@raychard123
@raychard123 2 жыл бұрын
Hears "Dean" and "Sam" while landing on your page within 5 seconds. Like button Smashed!! #Supernaturalfam.
@mohpish
@mohpish 3 жыл бұрын
Amazing explanation... couldn't do anything else but to subscribe... thank you
@sashab4432
@sashab4432 2 жыл бұрын
The reason why last one won't work is because the last 'castiel' is not a string. it's 'value' is undefined. so it will search by its value, & not by its name. We need to search by its name. So if we search it as a string 'castiel', then we will get the result.
@eminm6383
@eminm6383 4 жыл бұрын
very nice & clear explanation. Loved.
@gomogovo4966
@gomogovo4966 5 жыл бұрын
I'll be damned if that is not a "reference" to Supernatural...
@nicolaregiacorte8328
@nicolaregiacorte8328 3 жыл бұрын
Right to the point as always, thank you good Sir! =)
@EugeneVilder
@EugeneVilder 3 жыл бұрын
I'm a fan of Supernatural too :) Dean rules... Tnx for your videos.
@frank3481
@frank3481 3 жыл бұрын
Hi 4:04 Line 16, isn't it "not defined" instead of "undefined"? so even if you have undefined property inside "sam", it would still make ReferenceError errors.
@kamalsharma2839
@kamalsharma2839 2 жыл бұрын
I am also thinking same
@njamdagani
@njamdagani 4 жыл бұрын
At 4:23 castiel is not defined, you said it is undefined ?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
Yes. you are correct. `castiel` will be not defined in the last statement and that will be the reason for the failure of that line.
@21rogerwaters
@21rogerwaters 4 жыл бұрын
Steve, the first two console.log should return an error like the third one, but it doesn't 🤔: let dataTypes = { null: 'oi', undefined: 'olá', object: 'hhhhh' } console.log(dataTypes[null]) // => 'oi' - it works (why?) console.log(dataTypes[undefined]) // => 'olá' - it works (why?) console.log(dataTypes[object]) // => Uncaught ReferenceError: object is not defined - it did'n work (as espected)
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
null - is a keyword undefined - is a keyword object - is not a keyword. Therefore using `object` as a key in the object means a reference error. If you used `Object` as the key then you would be referring to the constructor function Object...meaning no error. All Object keys are strings. So, null becomes "null". undefined becomes "undefined". Object becomes "Object". Then all three could store a value.
@21rogerwaters
@21rogerwaters 4 жыл бұрын
​@@SteveGriffith-Prof3ssorSt3v3 it makes sense. Thank you so much Steve 🙏
@kamalsharma2839
@kamalsharma2839 2 жыл бұрын
Why Castiel would be undefined in last one ???
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
because there is no variable called castiel.
@abdulazeezatanda2371
@abdulazeezatanda2371 4 жыл бұрын
Do you use an extension on VSCode that makes your triple equals === and arrow notations => show differently?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
It is the Jet Brains Mono font in my theme
@abdulazeezatanda2371
@abdulazeezatanda2371 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Thanks
@doniaelfouly4142
@doniaelfouly4142 3 жыл бұрын
thanks
@JohnDoe-rj2kf
@JohnDoe-rj2kf 3 жыл бұрын
Dammit Sammy!
@RedEyedJedi
@RedEyedJedi 4 жыл бұрын
four* log statements. Was that part of the test? haha
@hiro6164
@hiro6164 2 жыл бұрын
nice
@quietackshon
@quietackshon 5 жыл бұрын
_Off topic_ 4:54 What was that sound?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 жыл бұрын
Wet dog shaking itself and its ears slapping the sides of its head.
@quietackshon
@quietackshon 5 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Never would've picked it.
JS Interview - this function - Question 13
5:16
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 4,1 М.
JavaScript for Beginners #44 Objects Dot Notation vs Bracket Notation
17:20
ЭТО НАСТОЯЩАЯ МАГИЯ😬😬😬
00:19
Chapitosiki
Рет қаралды 2,2 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,7 МЛН
JS Interview - var vs let - Question 9
7:46
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 6 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
DOT NOTATION vs BRACKET NOTATION in JavaScript
9:59
Deeecode The Web
Рет қаралды 4,5 М.
JS Interview - parseInt and map - Question 11
5:45
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 6 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
JS Interview - ASI - Question 5
5:44
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 8 М.
JavaScript for..in Loops
7:24
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 43 М.
An Encounter with JavaScript Objects
10:38
Fireship
Рет қаралды 146 М.
Let vs. Const in JavaScript  - What's the Difference?
6:09
Inheritance in JavaScript - Prototypal Inheritance tutorial
20:06