JavaScript in Depth
JavaScript Basics
By Xah Lee. Date:
2009-01-30
. Last updated:
2024-05-24
.
This page covers the basics of JavaScript, for beginners, in 30 minutes.
How to Run JavaScript
JS: Comment
JS: Print
JS: Quote String
JS: Number
JS: Assignment Operators
JS: let Declaration
JS: const Declaration
JS: Value Types
JS: Boolean: true, false
JS: if then else
JS: for while do Loop
JS: Array Tutorial
JS: Define Function
JS: Object Tutorial
JS: Semicolon
Search π
HTML
CSS
JS
JS Ref
DOM
SVG
JavaScript in Depth
Basic Syntax
Run JavaScript
Comment
Print
Quote String
Number
Operators
Boolean
Test Equality
Conditional
Loop
Array Tutorial
Object Tutorial
Value Types
Value Types
Primitive Value
typeof Operator
Variable
let π
const π
var π
Destructure Assignment π
String
String Overview
Template String π
String Code Unit
Property
Property Overview
Property Key
Dot vs Bracket Notation
Create Property
Get Set Property
Property Existence
Access Property
List Properties
for-in Loop
Property Attributes
Getter, Setter
Property Descriptor
Symbol
Object and Inheritance
Object Overview
Object Type
Find Object's Type
Prototype and Inheritance
Prototype Chain
in Prototype Chain?
Get Set Parent
Show Parent Chain π
Create Object
Object Literal Expr
Create Object + Parent
Prevent Adding Property
Clone Object π
Test Object Equality π
Add Method to Prototype
Array
Array Overview
Create Array
Sparse Array
Array-Like Object
Array Equality
Array How-To
Function
Define Function
Arrow Function π
Function Params
arguments Object
Rest Params π
Arg Default Value π
Arg Destructure π
f Declaration vs Expr
Closure
f call apply bind
Functional Programing
Pipe Functions π
Constructor, Class
this Binding
What is Constructor
Property Key "prototype"
Operator βnewβ
Operator βinstanceofβ
Property Key "constructor"
Class π
Keyword βextendsβ π
Keyword βsuperβ π
Iterable π
Interface
Iterable
Iterator
Iterator Prototype
for-of Loop
Spread Operator
Generator
Generator Function
Misc
Regular Expression
Date
Set π
Map π
Import π
Export π
Promise π
Proxy π
Convert String, Number
Try Catch Throw Finally
JS2015 Features
JS2016 to JS2020
How to Convert to JS2015
Style Guide
Semicolon
Exclamation Before Function
Strict Mode
x.y.z Associativity
Timing JS Code
Allowed Characters in Identifier
Source Code Encoding