Deep Foundations of Advanced JavaScript — Kyle Simpson — Frontend Masters

preview_player
Показать описание

Understand deeply how the JavaScript engine looks for variables in function and block scope (var, let and const). Learn which ES6 features can help or hurt your coding and which new features should be used with caution. Also why coercion is one of the overlooked keys to using JavaScript more effectively. With this course, you’ll see how gaining a deeper understanding of JavaScript will make you a better communicator and programmer!

Kyle Simpson’s Introduction 1:05
Lesson: Scopes and Closures Introduction 1:46
Lesson: IIFE Pattern 5:14

About Frontend Masters:

Connect with Frontend Masters online:
Рекомендации по теме
Комментарии
Автор

He just simply summarised his book easily. I like this guy

mijanigoni
Автор

Brilliant. Why didn't I see this before?

VasilyPavlik
Автор

The video ends in the most interesting part. :(

taxonomizando
Автор

...coz setimeout is Web Api..and Async stuff? And when callback inside settimeout is executing loop is already done and i is 6 ?

arch
Автор

My explanation for the last code. setTimeout is api function which belongs to browser. When we call setTimeout, it is the same to call an asnyc function. Therefore, for each run of the for loop, the program just calls setTimeout and continues to execute next run. It does not call the setTimeout callback right away. After the for loop, variable i becomes 6. Also, after for loop, callback functions in each setTimeout we already called start executing. Therefore, the result will be 6, 6, 6, 6, 6.
P/s: setTimeout second parameter indicates that a callback function will be fired after at LEAST that amount of time, not EXACTLY. For example, if second parameter of setTimeout is 2000, it guarantees that the callback will be executed after 2 second. It can be after 2.001s depending on when event loop start executing callback function.
This is just my explanation. May be right, or may be wrong or may be half and half. Feel free to correct me. I love learning from people

letranvinhtri
Автор

i learn SO much from this guy. i scour yt for his talks... brotha KNOW his JS!

aeronwolfe
Автор

If you want to destroy your nerves, just learn JavaScript. You can start using JavaScript after a couple of months, but you cant learn it for entire life! I am two years in JavaScript, and i am mad of my self because i don't know how stuff works under the hoods. But who cares... You don't need to know how mechanical parts working inside your car, but you still can be word rally champion in driving. :D

zlackbiro
Автор

isn't closure the privatisation of variables a function inside a mothod?

BusinessWolf
Автор

Isn't the very last example in the video not solved with using let instead of var?

LukeryaPereprygova
Автор

What's the difference between and IIFE function and anonymous function?

TheKira
Автор

most of what he demo'd here could be replaced with the 'let' keyword introduced in 2015. It allows block-scope variables.

LordOrwell
Автор

Hi!
Supposing you have some secret JavaScript functions that you don't want anyone to know. Also, that code (functions) are very resource consuming and this is why they need to be client side and not server side so you can't write those functions in python or php.
Also, obfuscation of JavaScript is not useful since it can be easily deobfuscated or seen by placing a breakpoint in the debugging tools in the browser.
This been said, could you make, please, a tutorial teaching us the best way to protect your secret JavaScript functions without paying for third party services?
Thank you so much in advance!

Krisler
Автор

At 12:2, is he Azat Mardan who asked the question?

sujitkumarsingh
Автор

You are the Most Powerful JavaScript Ally now. don’t tell crockford

wingsonthebus
Автор

When I ran the last code on Google chrome I got 0, 1, 2, 3, 4 but you are saying the code will produce 6, 6, 6, 6, 6?

What's going on?

MisbahuA
Автор

can we create 2 iife with the same name and in the same scope?

sidharth
Автор

At any one..discribe ...what is going on ...in that code..
My system ..is giving errors

sanjeevkumar-tydx
Автор

This is very simple concepts but the way you are explaining making it difficult to understand..

Santoshsingh-klfz
Автор

I didn't know you could name IIFEs

TheLemuroid
Автор

That's fucked up code I don't know if I would want to use that. I can't see any scenario where it would be ok to use something like this. The examples he gave weren't valid imo. I mean, JQuery? What is this, 2013?

habibsspirit