Summary
Below you will find a collection of tutorials teaching the basics of JavaScript.
Before You Start
These tutorials assume you have a basic understanding of HTML and CSS.
Exercises
You can download exercises to go along with these tutorials on our JavaScript exercises GitHub repo. Just click the green Code button in the corner and click the Download ZIP option.
JS Introduction
JS Basic Syntax
JS Data Types
Lessons
Strings – JavaScript Combining strings – JavaScript Template literals – JavaScript Numbers – JavaScript Arithmetic operators – JavaScript Increment and decrement operators – JavaScript Assignment operators – JavaScript Math object – JavaScript NaN – JavaScript Boolean – JavaScript Arrays – JavaScript Array methods – JavaScript Array destructuring – JavaScript Objects – JavaScript Object destructuring – JavaScriptJS Conditional Statements
Conditional statements allow you to run certain sections of code depending on whether a condition is true or false.
Lessons
if statement – JavaScript if…else statements – JavaScript else if – JavaScript Comparison operators – JavaScript Nesting conditional statements – JavaScript Multiple conditions – JavaScript Truthy and Falsy values – JavaScript Logical NOT operator – JavaScript Ternary operator – JavaScript switch statement – JavaScriptJS Loops
Loops allow you to repeat certain sections of code.
Lessons
for loop – JavaScript while loop – JavaScript do…while loop – JavaScript for…of loop – JavaScript for…in loop – JavaScriptJS Functions
Lessons
Functions – JavaScript Function with parameters – JavaScript return statement – JavaScript Function scope – JavaScript Function expression – JavaScript Arrow functions (no parameters) – JavaScript Arrow functions (1 parameter) – JavaScript Arrow functions (2+ parameters) – JavaScript Methods – JavaScriptJS DOM
This section shows you how to use JavaScript to select, modify, add, or remove elements on a web page.
Lessons
Select element – JavaScript Select multiple elements – JavaScript Modify text in element – JavaScript Modify styles – JavaScript Add class – JavaScript Remove class – JavaScript Toggle class – JavaScript Create element – JavaScript Remove element – JavaScript Get value from input – JavaScript Events – JavaScriptJS Other
Lessons
JSON – JavaScriptNext Steps
After taking this course, you can take our Terminal course.