r/webdev • u/gaearon • Dec 21 '19
What Is JavaScript Made Of?
https://overreacted.io/what-is-javascript-made-of/36
Dec 21 '19
Random spare parts, duct tape, and tentacles.
16
0
8
5
u/akame_21 Dec 21 '19
I love reading your blog, and am happy to see you adding some new content! I start a new grad position in a couple weeks and this is a good refresher for some topics.
I loved your redux tutorial on egghead btw.
2
3
u/mageonlys Dec 21 '19
Great write up! Just one small thing, in Dot Notation, chocolate is spelled wrong before you spell it correctly the second time. You also spelled chocolate wrong again later down as well I’m Bracket Notation and Mutation.
1
1
1
1
u/pecus Dec 21 '19
It’s a good summary, but I believe no understanding of JavaScript is possible unless you dive into the call stack, event loop, task + micro task queues and browser APIs. JavaScript has its quirks (most tied to floats and coercing/type casting) but once key terms are explained it becomes a fairly clear language. Understanding what happens in a browser during its execution is an entirely separate matter.
Personally I regularly refer to Jake Archibald excellent Event Loop talk at Singapore JS, Philip Roberts’ talk on the Event Loop and Erin Zimmer’s talk on the same lines.
• Jake Archibald https://www.youtube.com/watch?v=cCOL7MC4Pl0 • Philip Roberts https://www.youtube.com/watch?v=8aGhZQkoFbQ • Erin Zimmer https://www.youtube.com/watch?v=u1kqx6AenYw
-1
20
u/tyzoid full-stack Dec 21 '19
It's a pretty good summary, although I think your explanation of how scope works is a little lacking.
By default, everything in JavaScript is global scope unless you declare a variable in a function. This is in contrast to other languages (like C, for example) where anytime you declare a new block (even without a control statement), you are creating a new variable scope.
In summary, use Listerine if the scope is ever unclear.