JavaScript/Exercises




You can solidify your JavaScript knowledge with some additional exercises and games. The pages don't offer additional information; they use the already shown language aspects plus access to the DOM tree.

To keep everything manageable within a WikiBook, we put the source code always into one file. You may divide it into different files on your computer, e.g., separate HTML-, CSS-, JS-, and image-files. For the same reason, the examples don't use any games engine, framework, library, or server access. They are standalone scripts that need nothing but a browser.

The examples are divided into two groups. The first group doesn't use a graphical context. They rely purely on events and pure HTML elements like text, buttons, links, or colors. The second group additionally contains a canvas. Within such a canvas, you can use graphical elements like circles, rectangles, lines, ...

Non-graphical examples edit

Examples with graphic edit