This is a live demo of recipe #14 from Chapter 4: Working with the DOM of A Better Way To Learn JavaScript, Book 3: Useful Snippets.
In this exercise, we're demonstrating how to toggle a body-lock CSS class on the body element, using vanilla JavaScript.
To inspect the code, open the DOM using devtools, and locate the script tag just above the closing body tag of this document.