365 days. 1 book series. Daily JS lessons.
I’m committing to reading “You Don’t Know JS Yet” by Kyle Simpson , all 6 books , every day for a year and tweeting everything I learn.
If you’re on the same journey, follow along, let’s do this together. 🤝.
#365DaysOfYDKJS#YDKJS.
Scopes are determined at compile time in JavaScript.
Not at runtime. Not when the function runs. At compile time.
That one sentence changes how you read and write JS forever. 🧩
#365DaysOfYDKJS#YDKJS#JavaScript#LearnInPublic
Every variable in JavaScript does one of two things:
🔹 Receives a value → Target (LHS)
🔹 Provides a value → Source (RHS)
Understanding this is the foundation of how scope resolution works in JS. 💡
#JavaScript#YDKJS#365DaysOfYDKJS
The Temporal Dead Zone is one of the most misunderstood concepts in JS.
let and const are hoisted — but not initialized.
Access them before initialization and JS throws an error. Not undefined. An actual error. 👀
console.log(x) // ❌ TDZ Error
let x = "hello"
#JavaScript #YDKJS #365DaysOfYDKJS
Most people think JavaScript executes line by line.
But if it did — a syntax error on line 10 wouldn't stop line 1 from running.
It does. And that proves JS is compiled before execution. 🧠
#JavaScript#YDKJS#365DaysOfYDKJS
Day 14 of 365 — #365DaysOfYDKJS 🧵
Yesterday I said there are 3 things that prove JavaScript is compiled before execution.
Today we go through all three. Let's get into it 👇
#YDKJS#JavaScript#LearnInPublic
6/ Variables in JS do one of two things:
🔹 Target (LHS) → receiving an assignment
var greeting = "Hello" // greeting is a target
🔹 Source (RHS) → providing a value
console.log(greeting) // greeting is a source
Day 13 of 365 — #365DaysOfYDKJS 🧵
Starting Book 2 — Scopes & Closures today.
First up — revisiting why JavaScript is more compiled than most people think. Let's get into it 👇
#YDKJS#JavaScript#LearnInPublic
5/ Three things prove that JS is parsed and compiled before execution:
1️⃣ Syntax Errors
2️⃣ Early Errors
3️⃣ Hoisting
More on each of these tomorrow. 👀
#YDKJS#365DaysOfYDKJS#JavaScript