Worth checking
Myths and mix-ups
A few claims that are easy to pick up, and what MDN actually says.
JavaScript should not be confused with the Java programming language: the two are significantly different in syntax, semantics and use. MDN Glossary: JavaScript
Array.prototype.sort() sorts an array in place. The default order is ascending, built by converting the elements to strings and then comparing their UTF-16 code unit values. MDN: Array.sort() In a numeric sort, 9 comes before 80, but because numbers are converted to strings, "80" comes before "9" in the Unicode order. MDN: Array.sort()
A common confusion: ["1", "2", "3"].map(parseInt) does not give [1, 2, 3]. The actual result is [1, NaN, NaN]. MDN: Array.map()
innerHTML parses its input as HTML and writes the result into the page. MDN warns that APIs like this are injection sinks, and can be a vector for cross-site scripting (XSS) attacks if the input originally came from an attacker. MDN: Element.innerHTML
Try the same ideas as a quiz on the games page.