
Ask HN: How do I go about truly “understanding” JavaScript, or any language? - elbigbad
I can do plenty of JS and C programming, but feel like I&#x27;m not deeply understanding it. How do I take, say JS, and learn it to the point where it really clicks to the point where I can visualize what&#x27;s going on under the hood when I write programs?
======
lollipop25
> 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-...](https://thibaultlaurens.github.io/javascript/2013/04/29/how-
the-v8-engine-works/)). 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.

------
pedalpete
I found reading John Resig's Secrets of a Javascript Ninja and reading the
jquery source code a great help.

I've just started reading Javascript Design Patterns, so can't give a review
on that yet.

Of course, nothing beats actually writing javascript.

------
ankurdhama
What's going under the hood? It depends on how deep u wana look under the
hood? Language specification level or specific implementation level like
Google v8 etc.

------
GFK_of_xmaspast
There's really only one way: practice.

