← Camp Home
RBS CODE · QUICK REFERENCE

JavaScript Skills Map

One page. What you know, what JS3 adds, and what unlocks later.

JS3 is a game-skills map, not a giant lesson. You already know movement from JS2. JS3 adds the rules that turn movement into a game.
JS1 · THINK

JavaScript 1

Work with values and decisions.

<script> — start JavaScript
alert() — show a message
let — remember a value
"text" — strings
prompt() — ask a question
Number() — make a number
+ - * / — maths
if / else — choose what happens
== != < > <= >= — compare values
JS2 · CONTROL

JavaScript 2

Control real things on the page.

function — name instructions
onclick — run code on click
getElementById() — find an element
.value — read an input
.innerText — change text
.style — change CSS
.style.left / top — move an object
x / y — remember position
number + "px" — CSS position
JS3 · GAME RULES

JavaScript 3

Turn movement into a real game.

parameters — give a function information
return — get an answer back
keydown / event.key — keyboard controls
getBoundingClientRect() — object edges
&& — BOTH rules must be true
|| — EITHER rule can be true
!= and ! — not equal / NOT
collision — are two objects touching?
boundaries — stay inside the game
score / health / gold — change numbers
Math.random() — random positions
console.log() — see what is happening
UNLOCK LATER

Only when a project needs it

Timers
setInterval()
automatic movement
Arrays
[]
inventory, walls, bullets
Loops
for
check many objects
Smooth controls
keydown + keyup
hold keys down
Platformer movement
ySpeed + gravity
jump and land
Create objects
createElement()
bullets / new enemies
Objects
{ }
bundle game data
Save progress
localStorage
keep data
Memory trick: JS1 thinks → JS2 controls the page → JS3 adds game rules.