Skip to main content

Just JavaScript | My Notes

Explore the JavaScript Universe | Rebuild your mental model from the inside out

Overview

Below are some questions based on my notes from the Just JavaScript learning experience by Dan Abramov.

The key idea is that almost anybody can change the way they understand programming, and if they can do that they can change the trajectory of their coding career.

The goal of this doc is to aid the reader in changing the way they think and understand programming, JavaScript specifically but it can be applied to most languages.

Just JavaScript is a fantastic resource for learning the mental models and foundations of JavaScript

Check out the Just JavaScript website. It's a great resource for learning JavaScript and they offer a free preview!

Study Toggle Blocks Idea

Question: What is the foundation of our mental model in JavaScript?
The foundation of our mental model is values.
Question: What are primitive values in JavaScript and how do they differ from other values?
Each value belongs to a type. Primitive values are immutable.
Question: How do we reference values in JavaScript?
We can reference / point to values using “wires” we call variables.
Question: Why can't we create or change primitive values in JavaScript?
Primitive values are immutable and always exist. We can only summon them, not create or change them.
Question: What are non-primitive values in JavaScript and how do they differ from primitive values?
Non-primitive values are mutable. Examples include objects, arrays, and functions.
Question: How does garbage collection work in JavaScript?
JavaScript is a garbage-collected language. Objects that are no longer reachable from our code may eventually be destroyed by the garbage collector.
Question: In what ways do objects and functions differ from primitive values in our mental model of JavaScript?
Objects and functions are closer to us in our mental model, as we can reach and change them. Primitive values are immutable and cannot be changed, and may be thought of as distant and unreachable.
Question: What are functions represented/viewed as in our mental model of JavaScript?
In our mental model, all values are separate from our code. Thus, with functions viewed as values, they are not part of our code.
Study Toggle Blocks Insights

I don't think the toggle blocks are the best way to present this information nor to study it. It takes a lot of work to get it into this fomrat.

I think the next experiment will be to turn the notes into a narrative. I think that will be easier to read and study. It will likely be easier to write and could pontentially serve as a blog post or part of a book.