Library Search

Search Lessons

Search guides, examples, practice, and runnable labs with ranked results and highlighted snippets.

Reset

80 results for JavaScript

JavaScriptModule 01 JavaScript FundamentalsGuide

Guide

JavaScript / Module 01 JavaScript Fundamentals / Guide

A JavaScript engine is a program that interprets and executes JavaScript code. Every browser has its own engine.

51 match hitsMatched in path, content
JavaScriptModule 01 JavaScript FundamentalsGuide

Guide

JavaScript / Module 01 JavaScript Fundamentals / Guide

Understanding the difference between statements and expressions is fundamental to understanding how JavaScript code works.

41 match hitsMatched in path, content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

All JavaScript Module Systems

38 match hitsMatched in path, content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

Understanding the internal mechanisms that affect JavaScript performance allows you to write faster code. This section covers optimization triggers, deoptimization patterns, and how to work with—not against—the JavaScript engine.

29 match hitsMatched in path, content
JavaScriptModule 15 Asynchronous JavaScriptGuide

Guide

JavaScript / Module 15 Asynchronous JavaScript / Guide

│ EVOLUTION OF ASYNC JAVASCRIPT

28 match hitsMatched in path, content
JavaScriptModule 15 Asynchronous JavaScriptGuide

Guide

JavaScript / Module 15 Asynchronous JavaScript / Guide

9.2 Promises ## Introduction A Promise is an object representing the eventual completion or failure of an asynchronous operation. Promises provide a cleaner alternative to callbacks for handling async code. ┌────────────────────────────────────────────────────

25 match hitsMatched in path, content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

JavaScript.info: Proxy and Reflect

24 match hitsMatched in path, content
JavaScriptModule 15 Asynchronous JavaScriptGuide

Guide

JavaScript / Module 15 Asynchronous JavaScript / Guide

A callback is a function passed as an argument to another function, to be executed later (after some operation completes). Callbacks are the foundation of asynchronous programming in JavaScript.

21 match hitsMatched in path, content
JavaScriptModule 15 Asynchronous JavaScriptGuide

Guide

JavaScript / Module 15 Asynchronous JavaScript / Guide

JavaScript provides built-in timing functions that allow you to schedule code execution in the future. These functions are essential for creating delays, animations, polling, debouncing, throttling, and other time-based behaviors.

19 match hitsMatched in path, content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

Understanding hidden classes and inline caching is crucial for writing high-performance JavaScript. These V8 optimizations are key to fast property access.

17 match hitsMatched in path, content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

JavaScript automatically manages memory. The garbage collector finds and frees unused objects.

17 match hitsMatched in path, content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

A JavaScript engine is a program that executes JavaScript code. Modern engines are highly sophisticated, using multiple techniques to achieve near-native performance.

16 match hitsMatched in path, content
JavaScriptModule 15 Asynchronous JavaScriptGuide

Guide

JavaScript / Module 15 Asynchronous JavaScript / Guide

9.4 Error Handling in Async Code ## Overview Proper error handling in asynchronous code is crucial for building robust applications. Unlike synchronous code where errors propagate immediately through the call stack, async errors require special handling techni

15 match hitsMatched in path, content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

Arithmetic operators perform mathematical calculations on numeric values. JavaScript supports all standard mathematical operations plus some additional features like modulo and exponentiation.

45 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

Parameters and arguments are fundamental concepts in JavaScript functions. Parameters are variables listed in the function definition, while arguments are the actual values passed when the function is called. JavaScript provides flexible ways to handle paramet...

42 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

Module 13: Modern JavaScript (ES6+)

12 match hitsMatched in path, content
JavaScriptModule 01 JavaScript FundamentalsCode

Examples

JavaScript / Module 01 JavaScript Fundamentals / Examples

console.log('JavaScript'.toUpperCase()); // "JAVASCRIPT"

14 match hitsMatched in path, content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

Note: JavaScript engines don't always optimize tail calls, but the pattern is still useful for clarity.

38 match hitsMatched in content
JavaScriptModule 24 JavaScript Engine InternalsGuide

Guide

JavaScript / Module 24 JavaScript Engine Internals / Guide

Master the internal workings of JavaScript engines like V8, SpiderMonkey, and JavaScriptCore. Understanding these internals helps you write more performant code and debug complex issues.

11 match hitsMatched in path, content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

Assignment operators store values in variables. Beyond the basic =, JavaScript provides compound operators that combine assignment with other operations.

37 match hitsMatched in content
JavaScriptModule 02 Variables And Data TypesGuide

Guide

JavaScript / Module 02 Variables And Data Types / Guide

var is the original way to declare variables in JavaScript (pre-ES6). It's still valid but has quirks that make it less predictable.

36 match hitsMatched in content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

// These are ALL the falsy values in JavaScript:

36 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

5.3 Arrow Functions ## Overview Arrow functions, introduced in ES6 (ES2015), provide a more concise syntax for writing function expressions. They also have important differences in how they handle the this keyword, making them ideal for certain use cases like

36 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

17.1 Destructuring ## Overview Destructuring is a syntax that allows unpacking values from arrays or properties from objects into distinct variables. It makes code more readable and reduces repetitive property access. ## Array Destructuring ┌──────────────────

9 match hitsMatched in path, content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

When types differ, JavaScript converts values before comparing:

35 match hitsMatched in content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

4.4 While and Do-While Loops ## Overview While loops and do-while loops execute a block of code as long as a condition remains true. Unlike for loops, they don't have built-in initialization or update expressions, making them ideal for situations where the num

35 match hitsMatched in content
JavaScriptModule 01 JavaScript FundamentalsCode

Practice

JavaScript / Module 01 JavaScript Fundamentals / Practice

* 1.1 Introduction to JavaScript - Exercises

10 match hitsMatched in path, content
JavaScriptModule 02 Variables And Data TypesGuide

Guide

JavaScript / Module 02 Variables And Data Types / Guide

JavaScript has 8 data types, divided into two categories:

34 match hitsMatched in content
JavaScriptModule 02 Variables And Data TypesGuide

Guide

JavaScript / Module 02 Variables And Data Types / Guide

Type coercion is JavaScript's automatic (implicit) conversion of values from one type to another. This happens when operators or functions expect a certain type.

34 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

A function expression is an alternative way to define functions in JavaScript. Unlike function declarations, function expressions are not hoisted, and the function is created when the execution reaches that line. Function expressions can be anonymous or named.

34 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

JavaScript provides three methods to explicitly control the this context of a function: call(), apply(), and bind(). These methods allow you to invoke functions with a specific context or create new functions with a permanently bound context.

34 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

Master JavaScript's seventh primitive type - unique, immutable identifiers that enable powerful metaprogramming capabilities.

7 match hitsMatched in path, content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

The for loop is the most common looping structure in JavaScript. It executes a block of code a specified number of times, with built-in control over initialization, condition checking, and iteration updates.

33 match hitsMatched in content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

Error handling is a critical aspect of robust JavaScript programming. The try...catch statement allows you to handle runtime errors gracefully, preventing your application from crashing and providing meaningful feedback to users.

33 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

Higher-order functions are functions that either take other functions as arguments or return functions as their result. They're a fundamental concept in functional programming and are essential for writing clean, reusable, and expressive JavaScript code.

33 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

${...} is normal JavaScript, so keep it small enough to read. If the expression

6 match hitsMatched in path, content
JavaScriptModule 12 Execution ContextGuide

Guide

JavaScript / Module 12 Execution Context / Guide

Hoisting is JavaScript's behavior of moving declarations to the top of their scope during the creation phase. While it might seem magical, it's actually a predictable result of how execution contexts are created.

32 match hitsMatched in content
JavaScriptModule 01 JavaScript FundamentalsCode

Index

JavaScript / Module 01 JavaScript Fundamentals / Index

<title>1.1 Introduction to JavaScript</title>

7 match hitsMatched in path, content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

5.9 Pure Functions and Side Effects ## Overview Pure functions are functions that always produce the same output for the same input and have no side effects. Understanding pure functions is fundamental to functional programming and writing predictable, testabl

31 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

17.5 Generators ## Overview Generators are special functions that can pause execution and resume later, yielding multiple values over time. They provide a powerful way to create iterators and handle asynchronous operations. ## Generator Syntax ┌───────────────

4 match hitsMatched in path, content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

Functions are the fundamental building blocks of JavaScript applications. A function declaration is one of the primary ways to define a reusable block of code that performs a specific task. Function declarations are hoisted, meaning they can be called before t...

30 match hitsMatched in content
JavaScriptModule 05 FunctionsGuide

Guide

JavaScript / Module 05 Functions / Guide

Understanding scope and closures is fundamental to mastering JavaScript. Scope determines where variables are accessible, while closures allow functions to remember and access variables from their parent scope even after the parent has finished executing.

30 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptCode

Examples

JavaScript / Module 13 Modern JavaScript / Examples

const product = 'JavaScript Book';

6 match hitsMatched in path, content
JavaScriptModule 18 Browser APIs And StorageGuide

Guide

JavaScript / Module 18 Browser APIs And Storage / Guide

JSON (JavaScript Object Notation) is a lightweight data interchange format.

30 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptGuide

Guide

JavaScript / Module 13 Modern JavaScript / Guide

17.4 Iterators and Iterables ## Overview Iterators and iterables are protocols that allow objects to define their iteration behavior. They enable the use of for...of loops, spread operator, and other iteration constructs. ## The Protocols ┌────────────────────

3 match hitsMatched in path, content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

JavaScript provides two specialized loop constructs for iterating over data structures:

29 match hitsMatched in content
JavaScriptModule 13 Modern JavaScriptCode

Practice

JavaScript / Module 13 Modern JavaScript / Practice

// const name = 'JavaScript';

5 match hitsMatched in path, content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

3.7 Spread Operator ## Table of Contents 1. What Is the Spread Operator 2. Spread with Arrays 3. Spread with Objects 4. Spread with Function Calls 5. Spread vs Rest 6. Common Use Cases 7. Performance Considerations --- ## What Is the Spread Operator The spread

28 match hitsMatched in content
JavaScriptModule 24 JavaScript Engine InternalsCode

Practice

JavaScript / Module 24 JavaScript Engine Internals / Practice

* Practice your understanding of JavaScript engine internals.

4 match hitsMatched in path, content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

JavaScript's Object constructor provides many static methods that operate on objects. These are called on Object itself, not on object instances.

27 match hitsMatched in content
JavaScriptModule 24 JavaScript Engine InternalsCode

Examples

JavaScript / Module 24 JavaScript Engine Internals / Examples

* Practical demonstrations of JavaScript engine concepts

3 match hitsMatched in path, content
JavaScriptModule 01 JavaScript FundamentalsCode

Practice

JavaScript / Module 01 JavaScript Fundamentals / Practice

// Rename these variables following JavaScript conventions

2 match hitsMatched in path, content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

JavaScript conditions don't require actual booleans.

26 match hitsMatched in content
JavaScriptModule 15 Asynchronous JavaScriptCode

Practice

JavaScript / Module 15 Asynchronous JavaScript / Practice

* Practice working with JavaScript Promises.

2 match hitsMatched in path, content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

3.10 Optional Chaining Operator (?.) ## Overview The optional chaining operator (?.) allows you to safely access deeply nested object properties without having to explicitly check if each reference in the chain is valid. If any reference is null or undefined,

24 match hitsMatched in content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

The ternary operator (also called the conditional operator) is JavaScript's only operator that takes three operands. It provides a concise way to write simple conditional expressions.

24 match hitsMatched in content
JavaScriptModule 08 Numbers MathGuide

Guide

JavaScript / Module 08 Numbers Math / Guide

BigInt is a built-in JavaScript primitive that provides a way to represent integers larger than the Number.MAX_SAFE_INTEGER (2^53 - 1). Introduced in ES2020, BigInt enables precise arithmetic operations on arbitrarily large integers without losing precision.

24 match hitsMatched in content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

Prototypes are JavaScript's mechanism for inheritance. Every object in JavaScript has a hidden internal property called [[Prototype]] that references another object.

24 match hitsMatched in content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

3.8 Rest Operator ## Table of Contents 1. What Is the Rest Operator 2. Rest in Function Parameters 3. Rest in Array Destructuring 4. Rest in Object Destructuring 5. Rest vs Spread 6. Common Patterns 7. Best Practices --- ## What Is the Rest Operator The rest o

23 match hitsMatched in content
JavaScriptModule 09 Date TimeGuide

Guide

JavaScript / Module 09 Date Time / Guide

9.3 Internationalization (Intl) ## Overview The Intl object is the namespace for the ECMAScript Internationalization API, which provides language-sensitive string comparison, number formatting, date and time formatting, and more. It enables developers to creat

23 match hitsMatched in content
JavaScriptModule 04 Control FlowGuide

Guide

JavaScript / Module 04 Control Flow / Guide

4.2 Switch Statements ## Overview The switch statement evaluates an expression and executes code associated with the matching case. It's often cleaner than multiple if-else if chains when comparing a single value against multiple possibilities. --- ## Table of

22 match hitsMatched in content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

This section covers common design patterns and best practices for working with objects in JavaScript. These patterns solve recurring problems and provide reusable templates for structuring your code.

21 match hitsMatched in content
JavaScriptModule 11 ClassesGuide

Guide

JavaScript / Module 11 Classes / Guide

You can extend JavaScript's built-in classes.

21 match hitsMatched in content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

// Falsy values in JavaScript

20 match hitsMatched in content
JavaScriptModule 07 StringsGuide

Guide

JavaScript / Module 07 Strings / Guide

Regular expressions (regex) are patterns used to match character combinations in strings. JavaScript supports regex through the RegExp object and string methods.

20 match hitsMatched in content
JavaScriptModule 07 StringsGuide

Guide

JavaScript / Module 07 Strings / Guide

Strings are sequences of characters used to represent text. JavaScript strings are immutable - once created, they cannot be changed (methods return new strings).

19 match hitsMatched in content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

Objects are collections of key-value pairs where keys are strings (or Symbols) and values can be any type. They're the primary data structure in JavaScript for organizing and storing data.

19 match hitsMatched in content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

Every property in JavaScript has more than just a value. Properties have hidden attributes called descriptors that control their behavior.

19 match hitsMatched in content
JavaScriptModule 11 ClassesGuide

Guide

JavaScript / Module 11 Classes / Guide

...for creating objects and implementing inheritance. While classes are syntactic sugar over JavaScript's prototype-based inheritance, they offer a more familiar structure for developers coming from other languages.

19 match hitsMatched in content
JavaScriptModule 14 ES ModulesGuide

Guide

JavaScript / Module 14 ES Modules / Guide

Before ES6 modules, JavaScript had no built-in module system. Developers created various solutions to organize code into reusable, maintainable pieces. Understanding these systems helps you work with legacy code and appreciate why ES Modules became the standar...

19 match hitsMatched in content
JavaScriptModule 17 DOM ManipulationGuide

Guide

JavaScript / Module 17 DOM Manipulation / Guide

JavaScript Access: │

19 match hitsMatched in content
JavaScriptModule 18 Browser APIs And StorageGuide

Guide

JavaScript / Module 18 Browser APIs And Storage / Guide

JavaScript Object localStorage │

19 match hitsMatched in content
JavaScriptModule 03 OperatorsGuide

Guide

JavaScript / Module 03 Operators / Guide

Bitwise operators work on the binary representations of numbers, manipulating individual bits. JavaScript converts numbers to 32-bit signed integers before performing bitwise operations.

18 match hitsMatched in content
JavaScriptModule 06 ArraysGuide

Guide

JavaScript / Module 06 Arrays / Guide

Deep dive into the most important array methods that are essential for modern JavaScript development.

18 match hitsMatched in content
JavaScriptModule 16 Advanced AsyncGuide

Guide

JavaScript / Module 16 Advanced Async / Guide

AbortController provides a standard way to cancel asynchronous operations in JavaScript. It's essential for managing long-running requests, preventing memory leaks, and improving user experience by allowing users to cancel operations they no longer need.

18 match hitsMatched in content
JavaScriptModule 10 ObjectsGuide

Guide

JavaScript / Module 10 Objects / Guide

10.7 Object.fromEntries and Advanced Object Methods ## Overview This section covers advanced Object static methods including Object.fromEntries(), Object.groupBy(), and other modern object manipulation techniques. These methods provide powerful ways to transfo

17 match hitsMatched in content
JavaScriptModule 17 DOM ManipulationGuide

Guide

JavaScript / Module 17 DOM Manipulation / Guide

JavaScript

17 match hitsMatched in content
JavaScriptModule 01 JavaScript FundamentalsCode

Examples

JavaScript / Module 01 JavaScript Fundamentals / Examples

/** * ============================================ * 1.2 Basic Syntax - Examples * ============================================ * * This file demonstrates the fundamental syntax concepts * covered in the README. Run in browser console or HTML file. */ // =====

1 match hitsMatched in path
JavaScriptModule 13 Modern JavaScriptCode

Examples

JavaScript / Module 13 Modern JavaScript / Examples

// ============================================ // 17.1 Destructuring - Examples // ============================================ // -------------------------------------------- // 1. Array Destructuring Basics // -------------------------------------------- co

1 match hitsMatched in path
JavaScriptModule 13 Modern JavaScriptCode

Practice

JavaScript / Module 13 Modern JavaScript / Practice

// ============================================ // 17.1 Destructuring - Exercises // ============================================ // Exercise 1: Basic Array Destructuring // Extract the first two elements from the array const fruits = ['apple', 'banana', 'cher

1 match hitsMatched in path