AI Hints
Home›JavaScript Tutorial›Async Interview and Review
JavaScript · Lesson 134 of 138

Cheat Sheet

The whole course.

⏱ 2 min read▶ Video at 2:40:32🎓 Free
Watch this lesson in the JavaScript courseWatch on YouTube ↗Full JavaScript course

Let's review the whole course in a few screens. Pause on any one you want to keep as a reference.

Cheat Sheet
From the video: Cheat Sheet
  • The whole course
  • A few screens
  • Pause to keep them

The basics

Use const by default, and let when a value changes. The main types are numbers, strings, booleans, null, and undefined. Compare with three equals. And template literals, with backticks, put values inside strings.

keyvalue
const / letnever var
===strict equality
`Hi ${name}`template literals
typeofcheck a type

Functions and arrays

Arrow functions are short and common. Default parameters fill in missing arguments. And the array methods map, filter, reduce, find, and sort do most of the work with lists. Spread copies and combines arrays.

keyvalue
(a, b) => a + barrow function
map / filtertransform, select
reducecombine into one
[...a, ...b]spread

Objects and classes

Objects store named values. Destructuring unpacks them, and optional chaining reads them safely. JSON turns them into text and back. Classes are blueprints, with constructors, methods, getters, and private fields.

keyvalue
{ a, b } = objdestructuring
obj?.x ?? ysafe reading
JSON.parse / stringifytext and back
class, extendsblueprints

Async, DOM, and Node

Promises stand for future values, and async and await make them easy to use. Fetch gets data, so always check response dot o k. In the browser, query selector finds elements, and add event listener responds to people. And Node runs JavaScript on servers and in the terminal.

keyvalue
async / awaitreadable async
fetch + res.okget data safely
querySelectorfind elements
addEventListenerrespond to events

Summary

That's the whole course on four screens. Next, the final quiz.

Key takeaways
  • Basics, functions, arrays
  • Objects and classes
  • Async, DOM, Node
Next up: Final Quiz — test everything