🗒 Cheat Sheet← Lesson
BitWithBite
Full-Stack Worksheet

🔑 Variables & Data Types

Chapter: JavaScript — Core to ES6+ · Level ★★☆ · Time: 15 min
SCORE___ / 20
NameClassDate
After this worksheet you can
Choose const/let/var correctlyName the six data typesUse === over ==Predict coercion results
📚 Quick Recap

🎯 What you'll practice: Variable declarations, JS data types, and strict vs loose equality.

🧠 Section A · Concept Check ● BEGINNER 4 × 1 = 4

1Which cannot be reassigned?
20 == "0" evaluates to:
30 === "0" evaluates to:
4Which is a reference type, not a primitive?

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5The keyword you should default to for new variables is .
6var is scoped to the function; let and const are scoped to the .
7List all six core JavaScript data types.
8What is the difference between undefined and null?
9Why does === avoid bugs that == can introduce?

🚀 Section C · Challenge ● CHALLENGE 5

10A form field returns the string "0" for a quantity input, and a check `if (quantity == false)` accidentally treats it as empty. Explain why this happens and how to fix the check.
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-C   2-A   3-B   4-C  |  5 = const   6 = block   7 = number, string, boolean, array, object, undefined/null   8 = undefined means a variable has been declared but never assigned a value; null is an explicit, intentional "no value" assignment   9 = === compares both value and type without converting either side, so surprising type coercions (like "0"==false being true) never happen  |  10 = With ==, "0" is loosely coerced to false because it's falsy-adjacent in some comparisons — actually "0"==false is true due to numeric coercion of both sides to 0; the fix is `if (quantity === "" )` or convert to a number first with Number(quantity), then use ===.

📄 Need offline practice?Print this worksheet or open the one-page cheat sheet.
🗒 Cheat Sheet