ES 2009

Also known as ECMAScript 2009


Multiple Lines Strings

Allows string literals to span multiple lines when escaped with a backslash

"some \ 
text"

You can also use

"some" + 
"text"

use strict

This defines that javascript code cannot use undeclared variables


Strings

string.trim - removes whitespace from both sides of a string


Trailing Commas

Allows trailing commas in object and array definitions. JSON does not allow trailing commas.



Arrays

Array.isArray() - Checks whether an object is an array
Array.forEach() - calls a function once for each array element
Array.map
Array.filter
Array.reduce
Array.reduceRight
Array.every
Array.some
Array.indexOf - search an array for a particular value and return its position
Array.lastIndexOf


JSON.parse


JSON.stringify


Dates

Date.now


Object Property Get and Set


Objects

object.defineProperty - Lets you define an object and/or change a property's value
object.getOwnPropertyDescriptor
object.getOwnPropertyNames
object.keys
object.getPrototypeof
object.preventExtensions
object.isExtensible
object.seal
object.isSealed
object.freeze
object.isFrozen




© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext