🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
All Subjects
Free · 269 Topics · No Signup

JavaScript Notes

The language of the web — syntax, DOM, events, async and modern JavaScript — written by CodingNow 2.0's mentors. Free to read, structured to actually help you learn.

JavaScript notes by CodingNow 2.0 cover 269 topics — from js home to js jsonp — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, JavaScript interviews and CodingNow 2.0's mentor-led JavaScript course in Pitampura, Delhi.

No notes found. Try a different search term, or browse all JavaScript notes.

JS Tutorial

157 of 157 topics published
1

JS Home

! JS (https://www.w3schools.com/js/img_javascript_480.jpg)

2

JS Introduction

JavaScript is the programming language of the web.

3

JS Where To

In HTML, JavaScript code is inserted between <script and </script tags.

4

JS Output

JavaScript can "display" data in different ways:

5

JS Syntax

Syntax are the rules how programs must be constructed:

6

JS Statements

A computer program is a list of "instructions" to be "executed" by a computer.

7

JS Comments

JavaScript comments can be used to explain JavaScript code, and to make it more readable.

8

JS Variables

JavaScript variables are containers for data.

9

JS Let

The let keyword was introduced in ES6 (2015)

10

JS Const

The const keyword was introduced in ES6 (2015)

11

JS Types

A JavaScript variable can hold 8 types of data:

12

JS Operators

Operators are for Mathematical and Logical Computations

13

JS Arithmetic

Arithmetic operators perform arithmetic on numbers (literals or variables).

14

JS Assignment

Assignment operators assign values to JavaScript variables.

15

JS Comparisons

Comparison operators are used to compare two values.

16

JS Conditional

Conditional Statements allow us to perform different actions for different conditions.

17

JS If Conditions

Use the JavaScript if statement to execute a block of code when a condition is true.

18

JS If Else

Use the else statement to specify a block of code to be executed if a condition is false .

19

JS Ternary

let text = (age < 18) ? "Minor" : "Adult";

20

JS Switch

Based on a condition, switch selects one or more code blocks to be executed.

21

JS Booleans

In JavaScript, a Boolean is a primitive data type that can only have one of two values:

22

JS Logical

Logical operators are used to combine boolean expressions.

23

JS Loops

Loops can execute a block of code a number of times.

24

JS Loop for

For Loops can execute a block of code a number of times.

25

JS Loop while

While loops execute a block of code as long as a specified condition is true.

26

JS Break

The break statement "jumps out" of loops and switches.

27

JS Continue

The continue statement skips the current iteration in a loop.

28

JS Control Flow

Control Flow is the order in which statements are executed in a program.

29

JS Strings

A JavaScript string is zero or more characters written inside quotes.

30

JS String Templates

Template Strings use back-ticks ( ) rather than the quotes ("") to define a string:

31

JS String Methods

Javascript strings are primitive and immutable: All string methods produce a new string without altering the original string.

32

JS String Search

| String indexOf() String lastIndexOf() String search() String match() | String matchAll() String includes() String startsWith() String endsWith() |

33

JS Numbers

Numbers can be written with or without decimals.

34

JS Number Methods

| Basic Methods Basic number methods can be used on any number: toString() toExponential() toFixed() toPrecision() valueOf() | Static Methods Static methods can

35

JS Number Properties

| Number.EPSILON Number.MAX_VALUE Number.MIN_VALUE | Number.MAX_SAFE_INTEGER Number.MIN_SAFE_INTEGER Number.POSITIVE_INFINITY Number.NEGATIVE_INFINITY Number.Na

36

JS Bitwise

! Bits in a Computer (https://www.w3schools.com/js/img_bits_500.jpg)

37

JS BigInt

BigInt is a JavaScript data type for handling and storing big integer values.

38

JS Functions

- Functions are reusable code blocks designed for particular tasks

39

Function Intro

Functions are reusable code blocks designed to perform a particular task.

40

Function Invocation

A JavaScript function runs when it is called.

41

Function Parameters

Parameters allow you to pass (send) values to a function.

42

Function Returns

A function can return a value back to the code that called it.

43

Function Arguments

In JavaScript, function parameters and arguments are distinct concepts:

44

Function Expressions

A function expression is a function stored in a variable.

45

Function Arrow

Arrow Functions allow a shorter syntax for function expressions.

46

JS Timers

JavaScript timers let you run a function after a delay or repeatedly at fixed intervals.

47

JS Objects

- Objects are variables that can store both values and functions

48

Object Intro

Objects are variables that can store both values and functions.

49

Object Properties

A JavaScript object is a collection of properties

50

Object Methods

Methods are actions that can be performed on objects.

51

Object this

In JavaScript, this is used to access the object that is calling a method.

52

Object Display

Displaying a JavaScript object will output object Object .

53

Object Constructors

Sometimes we need to create many objects of the same type.

54

JS Scope

Scope determines the accessibility (visibility) of variables.

55

JS Code Blocks

A code block or block statement is a group of statements enclosed within curly braces { }.

56

JS Hoisting

Hoisting is JavaScript's default behavior of moving declarations to the top.

57

JS var/let/const

The primary difference between var , let , and const lies in scoping mechanisms, reassignment rules, and how JavaScript handles them via hoisting.

58

JS Strict Mode

The "use strict" directive was new in ECMAScript version 5.

59

JS Dates

JavaScript Date Objects let us work with dates:

60

JS Date Formats

There are generally 3 types of JavaScript date input formats:

61

JS Date Get

In JavaScript, date objects are created with new Date() .

62

JS Date Set

Set Date methods let you set date values (years, months, days, hours, minutes, seconds, milliseconds) for a Date Object.

63

JS Arrays

An Array is an object type designed for storing data collections.

64

JS Array Constructor

The new Array() constructor creates an Array object.

65

JS Array Methods

| Array length Array toString() Array at() Array join() Array pop() Array push() Array shift() Array unshift() | Array isArray() Array delete() Array concat() A

66

JS Array Search

| Array indexOf() Array lastIndexOf() Array includes() | Array find() Array findIndex() Array findLast() Array findLastIndex() |

67

JS Array Sort

| Alphabetic Sort Array sort() Array reverse() Array toSorted() Array toReversed() Sorting Objects | Numeric Sort Numeric Sort Random Sort Math.min() Math.max()

68

JS Array Iterations

Array iteration methods operate on every array item.

69

JS Array const

In 2015, JavaScript introduced an important new keyword: const .

70

JS Sets

A JavaScript Set is a collection of unique values.

71

JS Set Methods

| new Set() add() clear() delete() entries() | forEach() has() keys() values() size |

72

JS Set Logic

| Logic Set Methods In JavaScript 2025, 7 new logical methods were added to the Set object: union() difference() intersection() isDisjointFrom() isSubsetOf() is

73

JS Set WeakSet

A JavaScript WeakSet is a collection of values where the values must be objects.

74

JS Maps

A JavaScript Map is an object that can store collections of key-value pairs, similar to a dictionary in other programming languages.

75

JS Map Methods

You can create a map by passing an array to the new Map() constructor:

76

JS Map WeakMap

A JavaScript WeakMap is a collection of key/value pairs where the keys must be objects.

77

JS Iterations

JavaScript loops repeat executing a block of code a number of times.

78

JS Iterables

Iterable can be iterated over with for...of loops

79

JS Iterators

An Iterator is an object that provides a standard way to access elements sequentially.

80

JS Generators

A JavaScript Function can only return one value.

81

JS Math

The JavaScript Math object allows you to perform mathematical tasks.

82

JS Math Random

Math.random() returns a random number between 0 (inclusive), and 1 (exclusive):

83

JS RegExp

A Regular Expression is a sequence of characters that forms a search pattern.

84

JS RegExp Flags

Flags are parameters that can modify how a regex pattern is used, such as making it case-insensitive or global.

85

JS RegExp Classes

Character Classes are characters enclosed in square brackets .

86

JS RegExp Metachars

Metacharacters are characters with a special meaning.

87

JS RegExp Assertions

Assertions matches Boundaries and Lookarounds:

88

JS RegExp Groups

Regular Expression Groups allow you to treat multiple characters as a single unit, extract specific parts of a match, or reference captured text later.

89

JS RegExp Quantifiers

Regular Expression (Regex) quantifiers define how many times the preceding character, group, or character class must occur in a string. They control the boundar

90

JS RegExp Patterns

Flags can be added to a regexp pattern to Modify its behavior:

91

JS RegExp Objects

In JavaScript, RegExp is a regular expression object with predefined properties and methods.

92

JS RegExp Methods

| compile() | Compiles a regular expression (Deprecated) |

93

JS Data Types

A JavaScript variable can hold 8 types of data.

94

JS Primitive Data

A JavaScript variable can hold 8 types of data.

95

JS Object Types

A JavaScript variable can be either a Primitive type or an Object type.

96

JS Symbols

Every Symbol value is unique, even if they have the same description.

97

JS typeof

The typeof operator returns the data type of a JavaScript variable.

98

JS undefined

In JavaScript, a variable without a value has the value undefined .

99

JS NaN

In JavaScript, NaN is short for Not a Number.

100

JS toString()

The JavaScript toString() method converts a variable (or a value) to a string.

101

JS toLocaleString()

The toLocaleString() method converts a value to a string, using local formatting rules.

102

JS Type Coercion

Type coercion is the automatic conversion of values from one data type to another.

103

JS Type Conversion

JavaScript variables can be converted to a new variable and another data type:

104

JS Destructuring

The destructuring assignment syntax can unpack objects into variables:

105

JS Errors

When executing JavaScript code, different errors can occur.

106

JS Errors Silent

A silent error will not stop your program. The execution will continue.

107

JS Error Statements

In JavaScript, the try statement is used to handle errors (also called exceptions) that may occur during code execution - without stopping the entire program.

108

JS Error Object

JavaScript has a built in error object that provides error information when an error occurs.

109

JS Debugging

Many beginners quit because they cannot debug.

110

Debug Console

The browser console is the most important debugging tool for JavaScript beginners.

111

Debug Breakpoints

Breakpoints let you pause JavaScript and inspect what is really happening.

112

Debug Errors

JavaScript error messages look scary, but most of them mean very simple things.

113

Debug Async

Async bugs are the hardest bugs for beginners.

114

JS Style Guide

Always use the same coding conventions for all your JavaScript projects.

115

JS Best Practices

Avoid global variables, avoid new , avoid == , avoid eval()

116

JS Mistakes

This chapter points out some common JavaScript mistakes.

117

JS Performance

Each statement in a loop, including the for statement, is executed for each iteration of the loop.

118

JS Projects New

In this project you will build a counter with buttons to:

119

JS Event Listener

Now using Event Listeners instead of Onclick Attributes.

120

JS To-Do List

In this project you will build a To-Do List.

121

JS Modal Popup

A modal is a popup window that appears on top of the page.

122

JS Form Validation

In this project you will build a form with validation.

123

JS Versions

- Temporal API The long-time-overdue successor to the buggy, 30-year-old Date object. Unlike Date, Temporal objects are immutable and provide first-class suppor

124

JS 2026

ECMAScript 2026 (ES2026), the 17th edition of the JavaScript language specification, was officially ratified by ECMA International on June 30, 2026.

125

JS 2025

The 16th edition of the ECMAScript standard, released in June 2025, includes several enhancements to make JavaScript more readable and efficient.

126

JS 2024

| Object.groupBy() | Groups object elements according to values returned from a callback function | |

127

JS 2023

| ! (Shebang) | Tells the operating system which interpreter to use to execute the script | |

128

JS 2022

Supported in all modern browsers since March 2023.

129

JS 2021

| Promise.any() | Takes promises as input and returns a single promise | | |

130

JS 2020

| BigInt | Stores values too big to store in a JavaScript number |

131

JS 2019

| String trimStart() | Removes whitespace from the start of a string | |

132

JS 2018

| Asynchronous Iteration | Allows the await keyword in for/of loops | |

133

JS 2017

| String padStart() | Pads the beginning of a string | |

134

JS 2016

Supported in all modern browsers since March 2017.

135

JS 2015 (ES6)

| The let keyword | Declares a variable with block scope |

136

JS 2009 (ES5)

| "use strict" | Allows code to be executed in "strict mode" |

137

JS 1999 (ES3)

| Regular expressions | Sequence of characters that forms a search pattern |

138

JS Versions

The current JavaScript version is ES2025.

139

JS History

JavaScript was invented by Brendan Eich in 1995.

140

JS HTML DOM

The HTML DOM (HTML Document Object Model) is an Object Model for HTML Documents.

141

HTML DOM API

The DOM API (Application Programming Interface) is a set of Methods and Properties that allow JavaScript to change the content, structure, and style of any HTML

142

Selecting Elements

Often, with JavaScript, you want to manipulate HTML elements.

143

Changing HTML

The HTML DOM allows JavaScript to change both the text and the content of HTML elements.

144

Changing CSS

The HTML DOM allows JavaScript to change the style of HTML elements.

145

Form Validation

HTML form validation can be done by JavaScript.

146

DOM Animations

Learn to create HTML animations using JavaScript.

147

JS HTML Events

HTML events are things that happen to HTML elements.

148

Mouse Events

Mouse Events happen when the user interacts with the mouse.

149

Keyboard Events

Keyboard Events happen when the user presses a key on the keyboard:

150

Load Events

Load Events happen when the browser has finished loading an element.

151

Manage Events

Event Management is about adding, removing, and controlling events.

152

Event Examples

A JavaScript can be executed when an event occurs, like when a user clicks on an HTML element.

153

Event Listener

document.getElementById("myBtn").addEventListener("click", displayDate);

154

JS HTML First

HTML-First is a way of building websites where HTML is the foundation of the page.

155

HTML Progressive

Progressive enhancement is a web development strategy where the basic version of a website works first.

156

HTML First Features

HTML has many built-in features that can replace small JavaScript solutions.

157

HTML First CSS

In HTML-first development, CSS is often the second step after HTML.

JS Web API

22 of 22 topics published
158

JS Window API

The Browser Object Model (BOM) allows JavaScript to "talk to" the browser.

159

JS Screen

The window.screen object contains information about the user's screen.

160

JS Location

The window.location object can be used to get the current page address (URL) and to redirect the browser to a new page.

161

JS History

The History API lets you work with the browser's session history.

162

JS Navigator

The navigator object contains information about the visitor's browser.

163

JS Popup Alert

JavaScript has three kinds of popup boxes:

164

JS Cookies

Cookies let you store user information in web pages.

165

JS Fetch API

The Fetch API interface lets you download (fetch) data from a web server.

166

JS JSON

! HTML (https://www.w3schools.com/js/img_json.jpg)

167

JSON Syntax

JSON has a very simple syntax for representing structured data.

168

JSON Values

In JSON, values must be one of the following data types:

169

JSON Parse

The JSON.parse() method converts JSON text into a JavaScript value.

170

JSON Stringify

The JSON.stringify() method converts a JavaScript value into JSON text.

171

JSON Fetch

JSON is often stored in files or returned by calls to web servers.

172

JSON HTML

After JSON has been parsed, the resulting JavaScript values can be displayed in HTML.

173

JSON vs XML

JSON and XML are text formats used to store and exchange structured information.

174

JS Web API

- It can extend the functionality of the browser

175

API Geolocation

The HTML Geolocation API is used to get the geographical position of a user.

176

API Web Pointer

The Pointer Events API is a modern web standard that provides a unified input model for handling various pointing devices, such as a mouse, pen/stylus, and touc

177

API Web Storage

The Web Storage API is a simple syntax for storing and retrieving data in the browser. It is very easy to use:

178

API Validation

| checkValidity() | Returns true if an input element contains valid data. |

179

API Web Worker

A web worker is a JavaScript running in the background, without affecting the performance of the page.

JS Advanced

75 of 75 topics published
180

JS Temporal New

Temporal is the new standard for date and time in JavaScript.

181

Temporal Why

The Date object was created in 1995 and has some design issues that causes bugs.

182

Temporal vs Date

Learn the differences between JavaScript Date and Temporal

183

Temporal Duration

The Temporal.Duration object represents a length of time.

184

Temporal Instant

The Temporal.Instant object represents an exact moment in UTC time.

185

Temporal PlainDateTime

The Temporal.PlainDateTime object is a pure date and time object.

186

Temporal PlainDate

The Temporal.PlainDate object represents a calendar date without a time.

187

Temporal PlainYearM

The Temporal.PlainYearMonth object is a year and month object.

188

Temporal PlainMonthD

The Temporal.PlainMonthDay object is a month and day object.

189

Temporal PlainTime

The Temporal.PlainTime object is a time object without a date.

190

Temporal ZonedDate

The Temporal.ZonedDateTime object represents a date and time with a time zone.

191

Temporal Now

The Temporal.Now object provides 5 methods to get the system's date and time.

192

Temporal Arithmetic

JavaScript Temporal has methods for easy and reliable date and time arithmetic.

193

Temporal Since/Until

The since() method calculates the since duration between two dates.

194

Temporal Compare

In JavaScript, objects cannot be compared using operators like <, , ==, or ===.

195

Temporal Conversion

The table below shows how Temporal types can be converted.

196

Temporal Formats

Temporal dates can be serialized as strings in different ways:

197

Temporal Mistakes

Temporal is a powerful API, but it can be confusing at first.

198

Temporal Migrate

JavaScript Temporal was designed to replace the old Date object.

199

Temporal Standards

Temporal is based on the following standards:

200

JS Functions

These chapters are best after you understand basic functions (calling, parameters, return values, expressions, and arrows).

201

Function Definitions

Function Definitions vs Function Declarations

202

Function Callbacks

A JavaScript callback is a function passed as an argument to another function, which is then executed (or "called back") at a later point in time to complete a

203

Function this

When the this keyword is used in a function, it refers to an Object.

204

Function Call

The call() method can be used to call a function with a specific this.

205

Function Apply

The apply() method lets you write a method that can be used on different objects.

206

Function Bind

Like with call() and apply(), the bind() method can borrow a method from another object.

207

Function IIFE

An IIFE is short for an Immediately Invoked Function Expression.

208

Function Closures

Global variables can be made local (private) with closures.

209

JS Objects

When used in an object method, this refers to the object.

210

Object Definitions

An object literal is a list of property key:values inside curly braces { }.

211

Object this

return this.firstName + " " + this.lastName;

212

Object Iterations

// Copies properties from a source object to a target object

213

Object Get / Set

Getters and setters allow you to define Object Accessors (Computed Properties).

214

Object Management

Object.defineProperty(object, property, descriptor)

215

Object Protection

const car = {type:"Fiat", model:"500", color:"white"};

216

Object Prototypes

All JavaScript objects inherit properties and methods from a prototype:

217

JS Classes

ECMAScript 2015, also known as ES6, introduced JavaScript Classes.

218

JS Class Inheritance

To create a class inheritance, use the extends keyword.

219

JS Class Static

Static class methods are defined on the class itself.

220

JS Asynchronous

JavaScript normally runs one statement at a time.

221

Async Programming

While one task is running, no other JavaScript code can run. If a task takes a long time, the browser cannot respond to user actions until the task finishes.

222

Async Callbacks

A callback is a function passed as an argument to another function.

223

Async Promises

A Promise represents the future result of an asynchronous operation.

224

Async Await

The async and await keywords make Promise-based code easier to read.

225

Async Parallel

An await statement waits for one Promise before continuing.

226

Async Event Loop

JavaScript can only execute one piece of code at a time.

227

Async Fetch API

The Fetch API lets JavaScript download resources from a web server.

228

Async Mistakes

Asynchronous programming introduces new concepts:

229

Async Debugging

Asynchronous code can be more difficult to debug than synchronous code.

230

Async AbortControl

The AbortController Object lets you cancel asynchronous operations.

231

Async Web Workers

Until now, all examples in this tutorial run on the browser's main thread.

232

JS Modules

Modules are code blocks that can export and/or import functions and values.

233

Modules Export

A module uses the export keyword to share values with other files.

234

Modules Import

You can import modules in two ways, based on if they are named exports or default exports.

235

Modules Namespace

JavaScript creates a module namespace object.

236

Modules Dynamic

Note: Dynamic Import was introduced in ECMAScript 2020 Dynamic Import is a way to load JavaScript modules at runtime, rather than at the start of your pro

237

JS Meta & Proxy

Metaprogramming refers to a number of ways a program can manipulate itself:

238

Meta Reflect

Reflect is a object with methods for low-level operations on JavaScript objects.

239

Meta Proxy

A Proxy is a JavaScript object that can wrap other objects.

240

JS Typed Arrays

Typed arrays was designed for handling Binary Data.

241

Typed Methods

The from() method creates a new typed array from any iterable object:

242

Array Buffers

An ArrayBuffer is fixed a block of memory, often used to store typed arrays.

243

DataViews

The DataView Object lets you read and write multiple numeric types in an ArrayBuffer, at any byte offset, with optional control over endianness (byte order).

244

JS Atomics

The Atomics Object provides low-level atomic operations on shared memory.

245

JS DOM Navigation

With the HTML DOM, you can navigate the node tree using node relationships.

246

DOM Nodes

Adding and Removing Nodes (HTML Elements)

247

DOM Collections

The getElementsByTagName() method returns an HTMLCollection object.

248

DOM Node Lists

A NodeList object is a list (collection) of nodes extracted from a document.

249

JS Graphics

JavaScript libraries to use for all kinds of graphs:

250

JS Canvas

HTML Canvas is perfect for combining Scatter and Lines

251

JS Plotly

Plotly.js is a charting library that comes with over 40 chart types:

252

JS Chart.js

Chart.js is an free JavaScript library for making HTML-based charts. It is one of the simplest visualization libraries for JavaScript, and comes with the many b

253

JS Google Chart

From simple line charts to complex hierarchical tree maps, the Google Chart gallery provides a large number of ready-to-use chart types:

254

JS D3.js

D3.js is a JavaScript library for manipulating HTML data.

Old Technologies

15 of 15 topics published
255

JS AJAX

AJAX is a developer's dream, because you can:

256

AJAX XMLHttp

The keystone of AJAX is the XMLHttpRequest object.

257

AJAX Request

The XMLHttpRequest object is used to request data from a server.

258

AJAX Response

| responseText | get the response data as a string |

259

AJAX XML File

AJAX can be used for interactive communication with an XML file.

260

AJAX PHP

AJAX is used to create more interactive applications.

261

AJAX ASP

AJAX is used to create more interactive applications.

262

AJAX Database

AJAX can be used for interactive communication with a database.

263

AJAX Applications

This chapter demonstrates some HTML applications using XML, HTTP, DOM, and JavaScript.

264

AJAX Examples

AJAX Examples notes

265

JS jQuery

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations,

266

jQuery HTML

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations,

267

jQuery CSS

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations,

268

jQuery DOM

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations,

269

JS JSONP

Warning: JSONP is a Legacy Technique. Modern applications normally use fetch() with CORS instead. JSONP executes returned data as JavaScript and should only

Ready to go from notes to a real career?

Join CodingNow 2.0's JavaScript course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.

Enroll Now — Free Demo Available

JavaScript Notes – FAQs

What students search before reading JavaScript notes.

Yes — all 269 JavaScript topics on CodingNow 2.0 are completely free with no signup or paywall. Read them in the browser on mobile or desktop.
This hub covers 269 structured JavaScript topics — from absolute basics to advanced, interview-ready concepts — each with short explanations and working code examples.
The notes are written to be self-study friendly, but for job-ready skills, projects and placement support, CodingNow 2.0's mentor-led JavaScript course in Delhi (online + classroom) is the fastest path.
Yes. Each topic is concise and example-driven — ideal for last-minute revision before college exams, campus placements and JavaScript job interviews in India.
Working AI/ML engineers and full-stack developers from CodingNow 2.0 – Gurukul of AI, Pitampura Delhi, aligned with our 2026 course curriculum.
WhatsApp
Call NowEnroll Now