1 Variables & types
Declare with let and const. Core types: number, string, boolean, null, undefined, object and array.
const name = 'Ada';
let age = 36;
console.log(name + ' is ' + age);
console.log(typeof age, typeof name);
Variables, types, functions, control flow, arrays and objects.
Declare with let and const. Core types: number, string, boolean, null, undefined, object and array.
const name = 'Ada';
let age = 36;
console.log(name + ' is ' + age);
console.log(typeof age, typeof name);
Functions package logic. Use if/else, for and while for control flow.
function factorial(n) {
let r = 1;
for (let i = 2; i <= n; i++) r *= i;
return r;
}
console.log('5! =', factorial(5));
Arrays hold ordered lists; objects hold key/value pairs. Access with [] and ..
const user = { name: 'Mara', roles: ['admin', 'editor'] };
console.log(user.name);
console.log(user.roles[0]);
console.log(user.roles.length);
Code runs live in a sandboxed frame, rendered by your browser.
7 tasks across 3 pages — multiple-choice and fill-in (type the answer). Score 70% or higher to earn your certificate.
🔒 Pass the quiz above (70%+) to unlock your downloadable certificate.
Congratulations! Enter your name to generate your certificate.