5 hands-on exercises and 5 find-the-bug challenges for the How to Add JavaScript lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Find #out and set its text to "connected".
Read the heading text and show it.
Count how many paragraphs exist on the page.
Add the class "active" to #out then report "classed".
Confirm the body exists and report "loaded".
The selector omits the # so it looks for a tag named out.
document.text is not a real property.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspaceclasslist is spelled with the wrong capitalisation.
A node list is compared directly instead of its count.
The code reads a heading level that is not on the page.