setTimeout and setInterval for delayed/repeating code. Trigger CSS animations from JS. Intro to Canvas for drawing.
// Wait 2 seconds, then run
setTimeout(() => pourCoffee(), 2000);
// Repeat every 1 second
const id = setInterval(updateTimer, 1000);
clearInterval(id); // stop
// Trigger CSS animation
el.classList.add('animate-pulse');
Store setTimeout/setInterval IDs so you can clear them and avoid memory leaks.
Canvas API lets you draw shapes, images, and animations with JavaScript.