3 ms·
> How do I take, say JS, and learn it to the point where it really clicks to the point where I can visualize what's going on under the hood when I write program
by lollipop25 11y ago
> How do I take, say JS, and learn it to the point where it really clicks to the point where I can visualize what's going on under the hood when I write programs?
Learn how a JS engine works. Any engine will do, although V8 is very discussed on the internet. Here's a few things to get started with:
- How the event loop works (https://www.youtube.com/watch?v=8aGhZQkoFbQ https://www.youtube.com/watch?v=8aGhZQkoFbQ). This show how JS works under the hood, what's part of "JS" and what's extended, how async operations are scheduled on a single thread. After watching this, everything will just "click".
- How objects are represented in V8 (https://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/ https://thibaultlaurens.github.io/javascript/2013/04/29/how-...). It's v8-specific but nevertheless tells you how objects are represented in memory. Keeping these concepts in mind, you will be able to write efficient code on the get-go.
- ES6 spec (http://www.ecma-international.org/ecma-262/6.0/ http://www.ecma-international.org/ecma-262/6.0/). Optional reading (if you want to read 500+ pages), but it's a handy reference when in doubt. You can literally slap this thing to a person who doesn't know what they're talking about. Not that you should, but backing evidence is always great.