Code Basics, Flipped
The fundamentals, one page at a time
Flip with the arrows, the dots, or your ← → keys.
A Kim Codes Flip Book · No. 01
Code Basics, Flipped
Flip through the ideas everything else is built on.
Read online · Print for your desk
A Kim Codes Flip Book · No. 01
Code Basics, Flipped
Flip through the ideas everything else is built on.
Read online · Print for your desk
Page 01
A variable is a labeled box
You put a value in, you write a name on the box, and you use the name later. That’s the whole idea.
Good names are the difference between code you can read and code you dread.
const price = 39
const onSale = trueName things for what they mean, not what they are.
Page 02
A function is a promise
Give it inputs, it gives you a result. Same inputs, same result — every time.
If you can name what it does in a short verb phrase, it’s doing one job. That’s the goal.
function total(price, qty) {
return price * qty
}Page 03
Conditions are forks in the road
Code walks in a straight line until you hand it a decision. `if` picks a path based on what’s true right now.
if (onSale) {
applyDiscount()
} else {
fullPrice()
}Handle the “nothing matched” case on purpose.
Page 04
Loops do the boring part
Anything you’d do again and again, a loop does for you — once written, endlessly repeated.
for (const item of cart) {
ship(item)
}The end · for now
You just read a flip book
That’s the signature Kim Codes format: small pages, one idea each, easy to flip and easy to print.
The rest of the line goes deeper — animation, shortcuts, and the everyday moves of a working coder.
Browse the full showroom →