Javascript Essentials (Revised)

preview_player
Показать описание
This is a revised edition of the JavaScript Essentials video I published well over 3 years ago. This includes some corrections to my previous video as well as some updated essentials. It is also a direct replacement for the previous video, so there is no need to watch both.
Рекомендации по теме
Комментарии
Автор

*Bookmarks:*

*Syntax* - 5:45
_Notes:_
JavaScript infers type at run time (a string '42' - 2 equals 40 but a string '42' + 2 = '422' because concatenation takes priority over changing the object type)
typeof can show primitive type at run time (useful for debugging)'
use instance of for instance use typeof for primitive - 13:00
primitives are objects as well as everything else - 13:40

*Patterns* - 14:25
_Notes:_
There are two links to follow to read up on patters, these links lead to rather large reference, make sure to have a lot of time set aside to read these and be ready to really put a lot of effort into actually understanding what these sites are trying to teach
Creating objects - 15:22
Something that looks like it shouldn't work, does not work in the exact way it seems it shouldn't work. - 16:25
and @ 18:10 - the way you would normally do it in any other language is the way you should be doing it

*Objects* - 18:40
_Notes:_
An object is an unordered collection of key-value pairs
var object {
key: value;
};
Dot notation - 20:50 works just like it does in java or c or csharp or cpp etc.
in key-value pair, value can be another object (objectception) - 22:10

*Functions* - 23:40
_Notes:_
global variables should only be used when necessary. Really though, its never necessary (duh) - 28:30
setTimeout is asynchronous and obvious things happen because of this fact - 33:50
34:50 - what? oh I get it, you have two instances of setTimeout running and the first one has a variable of messages[0] and the second instance of setTimeout has the variable messages[1] and they are both still asynchronous but they have their own vars now... you explained that kinda weird...
Closure - 36:32 : I don't fully understand whats going on here but then again I don't really know much about design patterns in the first place
google more about module pattern

*The this keyword* - 44:45
_Notes:_
ok so not only can you pass an object type as a param on instantiation (I guess because everything is similiar to java generics and they didn't want to have to use all that <> stuff.. but wait; does the object type have to be the first param passed? why is it done this way at all? this just seems weird...) but you can also pass property names as.. strings...? I think I need to watch a few introductory videos on this language
@ 59:00 YOU CAN HAVE FUNCTIONS WITHOUT SPECIFYING PARAMETERS??!?! BUT WHY?!?!?

*Understanding Prototype* - 1:00:00
_Notes:_
Prototypes are weird but possibly necessary (?) because of reasons
I actually don't think I understood any of this. I'll have to come back to it later

>> Personal summary and final thoughts on the video <<
As the video went on I felt I understood less and less of the steps. Turns out one cannot simply learn JavaScript in 1 hour. I'll come back to this video after I have a better understanding of the language. Hopefully my personal notes will be of some use to me then.

runnerup
Автор

Hey Travis,
coming from Wordpress I made my way the last 2 months to Javascript. My Goal is to become Full-Stack in the next 2 years. To become great it takes time and practise I believe.

I have to give you a big shoutout your videos are great. When you say some gurus teach you theoretical stuff you are right. I watched around 50 hours of Tutorials in the last 2 months and I have to say your videos with the videos from LearnCode.academy are the best out there at the moment. (I also paid for Code School and this stuff.. they are good for the basics but not more).  

It would be great if you find time to make more videos like this, also your MEAN Vid was awesome and it took me 4 tutorials (in the end your tutorial was the key) to understand the MEAN Stack in the right way and the connections between the technologies.

Speaking as a newbie, give me more! :D

Cheers from Bangkok!

ChristianJosephs
Автор

Travis, I'm addicted to your videos! Thanks so much for convincing me to learn JavaScript at a high level. (currently a Java web dev)

The 51 minute mark, explaining the *this* pointer in regards to setTimeout...brilliant!

thebroscientist
Автор

Very nice tutorial, one of the best I've seen. It's unusual to find a high level of competence with a nice readable font. You even use the radix with parseInt which most people forget.. ☺️👍

derekfrost
Автор

I needed just 15 random seconds of this video to subscribe you. When i saw how you explain a simple function i knew that the whole video its awesome ! Best tutorial so far and really good explanations. I hope you're doing more videos. Keep up the good work.

MdFive
Автор

This is an excellent video. It hits so many important points concisely and with good pacing. Thank you Travis

SongMachina
Автор

Wonderful presentation! Saves me a lot of time, , , , I wonder why only a few thousand people watch this:(

shuaima
Автор

This is an awesome summary of tricky mechanics in JS. Thanks for saving me many future headaches!

gnawlej
Автор

Great presentation. Thanks for taking the time to record this new version!

RuiSantosdotme
Автор

Hi Travis,
I'm watching your great video and noticed a point (33:18) which i think was not clear enough.
You're talking about scopes but another very important thing here is the execution scheduling: The setTimeout, moves the callback function into the event queue which is executed ONLY when the current execution stack is over (even if you use 0ms as the delay parameter).
This means the anonymous function is executed AFTER the for loop has finished its all iterations, and THEN the scope issue arises to explain how the anonymous function is aware to the loop index when it runs.
Thanks for your video!

Автор

Thank you so much for this! So clear and concise, exactly what I was looking for. Really well thought out and intelligent examples throughout. The last 10 minutes started to get a bit challenging as the concepts started to stack up so had to listen over a few times. Not much better use of an hour than this!

toomuchtruth
Автор

I thought I knew a fair amount of js and 12 minutes in learnt something new. Thanks for the tutorial

digitalx
Автор

Excellent! I was unaware of prototype in Javascript. Thanks Travis!

rajkumarpalani
Автор

Very efficient explanation, concise, spot on. I really understood and i would like a complete javascript class...like 12 hours or something like that..i would be happy to pay for it :) keep the good work coming !

bishopoftroy
Автор

Your video is like a premium tutorials, thank you..

jsnode
Автор

Thank you so much for these tutorials!! I studied a bit of object oriented js on treehouse but I didn't get it that well. The explanation was flawless.

Really a lot of golden nuggets in here as you would say.

Cheers from Mexico :)

BowlineDandy
Автор

Hi man, tutorial is great.
i would like to see much more videos dedicated to javascript and i am sure much people would like it.

sergheisergheich
Автор

very nice explanation of 'this'

kap
Автор

Very informative video 'keep them coming'.

stevenlane
Автор

Hello Travis,
fantanstic work, thanks a lot!

I've tried removing the 'return function' part and the output is the same.
Under the hood, is there any difference? Is this still considered a closure? Are there any use cases where the output would be different?

P.S.: your videos are fantastic. Keep it up :D

victorantunes