Google Tech Talk
July 12, 2010
ABSTRACT
Presented by Misko Hevery.
If you are new to JavaScript and would like to understand how JavaScript works behind the scenes, than this talk is for you. We will look at the core philosophy behind JavaScript objects and how the primitives can be used to build up basic OO concepts such as Classes and what it means to instantiate an object. How functions are executed and the rules behind the “this” keyword and what it means to bind functions. How to think about the Asynchronous nature of non-blocking API and what it means for performance and testing.
Original source
35 responses to “Introduction to JavaScript and Browser DOM”
Very good talk about the basics of Javascript. 7 years later and it's still relevant.
Thank you Miško.
Watching after 7 years 🙂
1:38 This is the problem with Angular. It's a Java programmers API instead of a JavaScript programmers API.
He himself admits he conceived of Angular as a javascript neophyte.
And Angular 2? Why that's just trying to catch up with React.
But my suggestion is Vue.
around 40:00, the difference between _proto_ and prototype, good explanation
My respect to the „crazy guy“. This video is a classic now – in context of latest releases of angular. Here Misko really goes into the basics. Object === Hash! Nice insight to Javascript and oo concepts!
Thankful for Brad managing not to fire Miško! Angular ftw! xD
awesome talk i m fan of angular.js & +Miško Hevery Thanks for talk
Great presentation! Very concise and informative point by point. Now I am feeling like I can understand lots of JavaScript frameworks code clear. Thanks for it.
Hi Can you use laser Pen sometimes.
20:04 Snorts in the boogers.
Was it yummy? I dont wanna know.
So many things wrong with this guy and the way he describes how javascript works. He's so friggin condescending its unbearable. At 10:07 when he asks if volvo.powered changes vehicle.powered as well in a room full of people who are supposed to be programmers. As if no one there understands the concept of references, pointers, inheretence, static properties in OO programming. At 2010, that video was made in a time when OO programming concepts have already been used on a large scale for about 10 years. Saying 'youre covering up the property' is so condescending and he tries to put himself in a superior position 'above' the others. Fucking turd.
From a beginners type of view…"What are you saying???" I'm trying to learn though. Any good suggetions on how to learn this stuff without spending a lot of $$
This felt like a solid review of everything I learned in past month!! I'll never forget 'this'! (pun indended!) 😛
great information, very helpful!
pretty fast intro around 18:05 got pretty mind f*** but provoked some real thinking good mindrace…i say mindrace cause thats what this is not a tutorial or an intro
Crap is a bit strong, but definitely mediocre.
Seriously? No, w3schools is NOT a reference. w3schools is crap.
Question for Google developers, the official jQuey website used to list Google as one of the companies that uses the jQuery javascript library, but not anymore, does that mean Google developed its own library to achieve the same tasks, is it done for better performance or just reinvent the wheel because we can afford to? thanks
Arnold of js 😀
Also saying 'this' can never be null or undefined, even using apply(null) or call(null) is incorrect. In strict mode, it's actually true.
In non strict mode, this goes to Object(this) transformation, so passing null or undefined result in this pointing to global object.
I think the explanation of 'this' was not correct.
A function is an object which has a property named 'this' which will point to the object whose property this function is (which can be changed by using call and apply). In your case, var fn = circle.area; meant fn is an object which is a property of the global object which is the window. So 'this' points to window.
awesome!!!
very nice. it seems like everytime I look at javascript, i see something different. that's the biggest difficulty in learning js properly. as the speaker states, convention is a huge part of js development…there's the language itself, the dom api and then the conventions.
(function(b){return function(c){return function(a){return a+b+c;}}})('talk,')(' Misko!')('Great ');
thank you !
is __proto__ a JavaScript language construct like the speaker makes it seem
5:28 "Does that make sense?" Uh… no.
a useful, for free, lesson thank you
Oops my finger slipped.
thanks for talking about the actual programming language without using alert() boxes within the first 15 seconds. Its a YouTube first!
@Raizdecimal
"Someone please tell him javascript ain't supposed to be Java."
I couldn't agree more. He kept calling certain things "problems" where in fact the problem was that he expected JS to behave like Java. His "workarounds" are actually the way it's supposed to be done in JS. I could say the same thing about Java, calling the massive code just to create a binding a problem … but I don't because there's a reason why it's done that way in Java, & a reason why JS is done differently.
@webr3
"if you think of a function as a class, then __proto__ is on the instance and prototype is on the class"
I think that's what he meant by saying only functions have prototypes … all objects have prototypes but only functions requires you to associate the prototype.__proto__ with the .prototype of the class. I think he spent way too much time of __proto__ since the "new" constructor takes care of it for you and it's better practice to avoid __proto__ due to dependencies.
@webr3
No, you're right that "this" isn't always "window", but it is the root environment variable whatever that is. For a browser it's windows. for server js frameworks it's "process" or "server" etc … depending on the framework.
function orgy @44:44
Strange. He talks about "__proto__" and "prototype". I've been reading JavaScript: The Definitive Reference (O'Reilly, 2007) and it does not mention "__proto__" at all. It explains that "prototype" is a property of ALL objects; whereas Misko states in the video that "prototype" is only defined for functions. In reading "JavaScript: The Good Parts", page 21, the first sentence under the heading "Prototype" says "Every object is linked to a prototype object from which it can inherit properties"