JavaScript Intermediate

Array methods, the DOM and events, and modern ES6+ syntax.

3 lessons 5 tasks ⚡ Live compiler
Lessons Compiler Quiz Certificate

📚 Lessons

1 Array methods

map transforms, filter selects and reduce aggregates — all without mutating the original array.

const nums = [1, 2, 3, 4, 5];
const evens = nums.filter(n => n % 2 === 0);
const sum = nums.reduce((a, b) => a + b, 0);
console.log('evens', evens);
console.log('sum', sum);

2 The DOM & events

JavaScript reads and changes the page through the DOM and responds to user events with addEventListener.

document.body.innerHTML = '<button id="b">Click</button><p id="out"></p>';
let n = 0;
document.getElementById('b').addEventListener('click', () => {
  document.getElementById('out').textContent = 'Clicks: ' + (++n);
});

3 Modern ES6+ syntax

Arrow functions, template literals, destructuring and the spread operator make code concise.

const user = { name: 'Ivo', city: 'Helsinki' };
const { name, city } = user;
const greet = (n) => `Hi, ${n}!`;
console.log(greet(name));
console.log([...[1,2], ...[3,4]]);

⚡ JavaScript Compiler

Code runs live in a sandboxed frame, rendered by your browser.

JS

            

📝 Tasks

5 tasks across 2 pages — multiple-choice and fill-in (type the answer). Score 70% or higher to earn your certificate.

🎓 Certificate of Completion

🔒 Pass the quiz above (70%+) to unlock your downloadable certificate.