bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/Debugging, Projects, and Reference
JavaScript•Debugging, Projects, and Reference

JavaScript 2009 (ES5)

ECMAScript 2009

The first major revision to JavaScript. ECMAScript 2009 is also known as ES5.

ES5 Features

Feature

Description

"use strict" Allows code to be executed in "strict mode" String [] access Returns the character at a specified index in a string

Multiline strings

Aallows strings over multiple lines if escaped with \ String.trim() Removes whitespace from both sides of a string Array.isArray() Returns true if a variable is an array

Array forEach()

Calls a function for each array element

Array map()

Creates a new array from a function on each element

Array filter()

Creates an array from array elements that passes a test

Array reduce()

Reduces an array to a single value (from left)

Array reduceRight()

Reduces an array to a single value (from right)

Array every()

Checks if all array values pass a test

Array some()

Checks if some values pass a test

Array indexOf()

Search for an element value and returns its position

Array lastIndexOf()

Search for an element value and returns its position JSON.parse()

Convert JSON into a JavaScript object

JSON.stringify()

Convert JSON into a string

Date.now() Returns the number of milliseconds since zero date

Date toISOString()

Converts a date object into to an ISO string

Date toJSON()

Converts a date object into to a JSON string

Property getters

Allows for defining how a property value is retrieved

Property setters

Allows for defining how a property value is set

Reserved names

Allows reserved names as property names

Object.create()

Previous

Javascript 2015 (ES6)

Next

JavaScript 1999 (ES3)