Skip to main content


Showing posts from July, 2016

JavaScript: Advanced JS Foundations

I went to an all day tutorial by Kyle Simpson. He has a book called You Don't Know JS. Here are my notes:
Scope I missed the first 2 hours. However, that only consisted of 14 or so slides, and I managed to catch up by reviewing the slides and someone else's notes.

JS is a compiled language. It continuously compiles and executes the code. var foo = "bar" is 2 operations not 1. It's both a declaration as well as an assignment.

The scope manager reserves spots in memory for variables.

When you assign a variable, if it's heard of it, it uses it, otherwise, it makes it global.

Functions have their own scopes.

He talked about shadowing.

Figuring out the scope of things is done during the compilation phase.

He talked about the LHS and RHS of an assignment.

window and global scope are different. Global scope sits above window. window is an alias to global scope only in the browser.

It's not a good idea to use global scope because: You're more likely to see …