JavaScript
JavaScript Clear filters
-
Lesson 2 No cost 14 minJavaScript · Beginner
Project: build a Hangman game
Build the word-guessing game step by step: a random word, blanks, letter guesses, attempts, winning and losing, and a version you can play on a web page.
Maximilian BahramiStudent
3
-
Lesson 1 No cost 20 minJavaScript · Beginner
Functions: 20 exercises
20 exercises to practise functions, each with a short lesson first: parameters and returns, writing to the page, arrays, strings and regular expressions. Every answer runs.
Maximilian BahramiStudent
1
-
Lesson 8 No cost 7 minJavaScript · Beginner
Logical operators: &&, || and !
Combine conditions with && (and), || (or) and ! (not), use brackets when you mix them, fill in default values with ||, and avoid the range mistake 10 < age < 20.
Maximilian BahramiStudent
2
-
Lesson 7 No cost 7 minJavaScript · Beginner
if statements: make your code decide
Run code only when something is true with if, else and else if, put your checks in the right order, combine them with && and ||, and use the short ? : for simple choices.
Maximilian BahramiStudent
1
-
Lesson 6 No cost 7 minJavaScript · Beginner
Functions, part 2: buttons, arrow functions and default values
Run a function when a button is clicked, write short arrow functions with =>, give parameters default values, and learn which variables a function can see.
Maximilian BahramiStudent
1
-
Lesson 5 No cost 5 minJavaScript · Beginner
Functions, part 1: make one, call it, get an answer back
Make a function and call it, give it values with parameters, get an answer back with return, and know when to use console.log and when to use return.
Maximilian BahramiStudent
1
-
Lesson 4 No cost 6 minJavaScript · Beginner
const: names that keep their value (and when to use let)
What const means, how it differs from let, the simple rule for choosing between them, how const works with page elements and lists, and the three mistakes beginners make most.
Maximilian BahramiStudent
1
-
Lesson 3 No cost 8 minJavaScript · Beginner
Booleans: true, false and the decisions your code makes
Store a yes or no in a variable, get one from a comparison, combine them with &&, || and !, learn which values are truthy and falsy, and avoid the "false"-in-quotes trap.
Maximilian BahramiStudent
2
-
Lesson 2 No cost 7 minJavaScript · Beginner
Random numbers in JavaScript: dice, lists and fair shuffles
Make a random whole number in any range with Math.random() and Math.floor(), pick a random item, shuffle a list fairly, avoid the Math.round trap, and know when to use crypto instead.
Maximilian BahramiStudent
1
-
Lesson 1 No cost 9 minJavaScript · Beginner
The load event: when is the page ready for your JavaScript?
Run your code at the right moment: load versus DOMContentLoaded, window.onload versus addEventListener, defer and async scripts, document.readyState, and the mistakes that cause "null" errors.
Maximilian BahramiStudent
Your notes could be someone's turning point.
Publish for free in minutes. Tutors with payouts set up can sell their articles and keep 85% of every sale.