Basics – Introduction to JavaScript syntax. Learn how to include the scripts on a HTML page, how to declare a function, target a DOM element by it ID, how to output the data and how to write comments.
This is a basic interactive cheat sheet containing all useful JavaScript code examples on a single page. Here you can find code for variables, objects, loops, data types, events, strings and other categories.
To help you sort through it all, we’ve compiled a collection of cheatsheets and guides for JavaScript and its many flavors. The beauty of plain JavaScript (sometimes referred to as “Vanilla”) is that you don’t need to load any special libraries to use it.