JavaScript, one lesson a day
The lessons
- Lesson 1 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.
- Lesson 2 Newest lesson 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.