Beginner · 7h 1m · 22 lessons
JavaScript Basics
The language of the web, one friendly step at a time: variables, functions, live pages.
What you'll learn
- ✦Explain what JavaScript is and where it runs, in the browser and in Node.js
- ✦Declare variables the right way with
letandconst, and name JavaScript's core data types - ✦Build text cleanly with template literals, and work with strings with confidence
- ✦Write reusable functions, including modern arrow functions
- ✦Store lists in arrays, and transform them with
map,filter, andforEach - ✦Model real things with objects, and read and change their properties
- ✦Make decisions with
if/else, and repeat work with loops - ✦Change a live web page through the DOM, react to clicks with events, and fetch JSON data from the web
- ✦Write modern JavaScript with destructuring, spread, modules, and
async/await - ✦Handle errors with
try/catch, store data withlocalStorage, and schedule work with timers
Part of these career paths
- Frontend Developer path · course 3 of 8
- Full-Stack Developer path · course 2 of 14
Certification projects
Build 4 projects to earn your certificate
Hands-on work that proves you can apply what you learned — part of the certificate requirements.
Syllabus
Module 1 · 58m
Getting started Free
What you'll be able to do
- Can explain what JavaScript does on a web page, and how it differs from HTML and CSS
- Can say where JavaScript runs: in a browser's console and in Node.js
- Can add a <code><script></code> tag to an HTML page and run a line of JavaScript on it
Module 2 · 1h 4m
Values & variables Locked
What you'll be able to do
- Can declare a variable with <code>let</code> or <code>const</code>, and choose the right one for the job
- Can name JavaScript's core data types: number, string, boolean, undefined and null
- Can build text with template literals instead of joining strings with <code>+</code>
Module 3 · 1h 54m
Functions, arrays & objects Locked
What you'll be able to do
- Can write a function that takes inputs and returns a result, as a regular function or an arrow function
- Can store, read and change items in an array by index
- Can transform and filter a list with <code>map</code>, <code>filter</code> and <code>forEach</code>
- Can group related data in an object and read and change its properties
Module 4 · 1h 41m
Logic, the page & the web Locked
What you'll be able to do
- Can branch code with <code>if</code>/<code>else</code> and repeat it with a loop
- Can find and change an element on the page with the DOM
- Can react to a click or another event with <code>addEventListener</code>
- Can fetch JSON data from the web and use it in a real page
Module 5 · 42m
Modern JavaScript Locked
What you'll be able to do
- Can pull values out of arrays and objects with destructuring, and copy or merge them with spread
- Can write asynchronous code with <code>async</code>/<code>await</code> instead of nested callbacks
- Can split code into modules with <code>import</code> and <code>export</code>
Module 6 · 42m
JavaScript in the browser Locked
What you'll be able to do
- Can catch and handle an error with <code>try</code>/<code>catch</code> instead of crashing the page
- Can save and read back data in the browser with <code>localStorage</code>
- Can schedule code to run later or repeatedly with <code>setTimeout</code> and <code>setInterval</code>
More Languages courses