JavaScript-versioner


Indholdsfortegnelse

    Vis indholdsfortegnelse

JavaScript blev opfundet af Brendan Eich i 1995, og blev en ECMA-standard i 1997.

ECMAScript er det officielle navn på sproget.

ECMAScript-versioner er blevet forkortet til ES1, ES2, ES3, ES5 og ES6.

Siden 2016 er versioner navngivet efter år (ECMAScript 2016, 2017, 2018, 2019, 2020).

ECMAScript-udgaver

Ver Official Name Description
ES1 ECMAScript 1 (1997)First edition
ES2 ECMAScript 2 (1998)Editorial changes
ES3 ECMAScript 3 (1999)Added regular expressions
Added try/catch
Added switch
Added do-while
ES4 ECMAScript 4Never released
ES5 ECMAScript 5 (2009)

Read More
Added "strict mode"
Added JSON support
Added String.trim()
Added Array.isArray()
Added Array iteration methods
Allows trailing commas for object literals
ES6 ECMAScript 2015

Read More
Added let and const
Added default parameter values
Added Array.find()
Added Array.findIndex()
ECMAScript 2016

Read More
Added exponential operator (**)
Added Array.includes()
ECMAScript 2017

Read More
Added string padding
Added Object.entries()
Added Object.values()
Added async functions
Added shared memory
Allows trailing commas for function parameters
ECMAScript 2018

Read More
Added rest / spread properties
Added asynchronous iteration
Added Promise.finally()
Additions to RegExp
ECMAScript 2019

Read More
String.trimStart()
String.trimEnd()
Array.flat()
Object.fromEntries
Optional catch binding
ECMAScript 2020

Read More
The Nullish Coalescing Operator (??)

Denne vejledning dækker alle versioner af JavaScript:

  • Det originale JavaScript ES1 ES2 ES3 (1997-1999)

  • Den første hovedrevision ES5 (2009)

  • Den anden revision ES6 (2015)

  • Årlige tilføjelser (2016, 2017, 2018, 2019, 2020)


Browser support

ECMAScript 1 - 6 er fuldt understøttet i alle moderne browsere.


Browserunderstøttelse til ES5 (2009)

Browser Version From Date
Chrome23Nov 2012
Firefox21May 2013
IE9*Mar 2011
IE / Edge10Sep 2012
Safari6Jul 2012
Opera15Jul 2013

* Internet Explorer 9 understøtter ikke ECMAScript 5 "brug streng".


Browserunderstøttelse til ES6 (2015)

Browser Version Date
Chrome51May 2016
Firefox52Mar 2017
Edge14Aug 2016
Safari10Sep 2016
Opera38Jun 2016

Internet Explorer understøtter ikke ECMAScript 2015.



Browserunderstøttelse til ECMAScript 2016

Browser Version Date
Chrome52Jul 2016
Firefox54Jun 2017
Edge14Aug 2016
Safari10.1Mar 2017
Opera39Aug 2016