Historien til
JavaScript








Mocha
Brendan Eichs kodenavn
LiveScript
Internt navn i Netscape
Mocha
Brendan Eichs kodenavn
JavaScript
Offentlig navn
LiveScript
Internt navn i Netscape
Mocha
Brendan Eichs kodenavn
Flexible, lightweight programmability is provided via JavaScript, a programmable API that allows cross-platform scripting of events, objects, and actions. It allows the page designer to access events such as startups, exits, and user mouse clicks. Based on the Java language, the JavaScript extends the programmatic capabilities of Netscape Navigator to a wide range of authors and is easy enough for anyone who can compose HTML.
– Netscape Navigator 2.0B3 release notes
Java is to JavaScript as ham is to hamster.
– Jeremy Keith (webutvikler), 2009


JavaScript
vs.
JScript
ECMA
- European Computer Manufacturers Association (International)
- Standardiseringsorganisasjon for informasjons- og kommunikasjonssystemer
- JavaScript ble spesifisert i standarden ECMA-262
ECMA
- European Computer Manufacturers Association (International)
- Standardiseringsorganisasjon for informasjons- og kommunikasjonssystemer
- JavaScript ble spesifisert i standarden ECMA-262
ECMAScript var født! 🎉
TC39
- Technical Committee 39
- Administrerer den offisielle spesifikasjonen av språket
- Bestod av representanter fra Sun Microsystems, Netscape, Microsoft ++
- Møtes regelmessig for å diskutere "proposals"
Proposal-prosessen
Stage 1
Stage 0
Stage 2
Stage 3
Stage 4
Strawperson
Proposal
Draft
Candidate
Finished

ECMAScript
- ECMAScript 1 (1997): første versjon
- ECMAScript 2 (1998): mindre endringer
- ECMAScript 3 (1999): regular expressions, string processing, control statements (do-while, switch), exception handling (try-catch) ++
-
ECMAScript 4 (2008):en for ambisiøs oppdatering - ECMAScript 5 (2009): mindre endringer
- ECMAScript 5.1 (2011): mindre endringer
ECMAScript
- ECMAScript 6 / 2015 (v6): mange oppdateringer, realiserte mange av ideene fra ES4
- ECMAScript 2016 (v7): første årlige release, mindre endringer
- ECMAScript 2017 (v8): mindre endringer
- ECMAScript 2018 (v9): mindre endringer
- …og så videre



ECMAScript 2023 (ES14)
- Array find from last (findLast og findLastIndex)
- Change Array by Copy (toReversed, toSorted, toSpliced og with)
- Hashbang Grammar
- Symbols as WeakMap keys
ECMAScript 2023 (ES14)
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
ECMAScript 2023 (ES14)
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
> 950
ECMAScript 2023 (ES14)
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
> 950
.findLastIndex()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLastIndex((element) => element > 900);
console.log(found);
ECMAScript 2023 (ES14)
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
> 950
.findLastIndex()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLastIndex((element) => element > 900);
console.log(found);
> 3
ECMAScript 2023 (ES14)
.toReversed(), .toSorted(), .toSpliced(), .with()
const sequence = [1, 2, 3];
const reversed = sequence.toReversed();
console.log(reversed); // => [3, 2, 1]
console.log(sequence); // => [1, 2, 3]
const outOfOrder = [3, 1, 2];
const sorted = outOfOrder.toSorted();
console.log(sorted); // => [1, 2, 3]
console.log(outOfOrder); // => [3, 1, 2]
const original = [1, 1, 2, 3];
const spliced = original.toSpliced(1, 1);
console.log(spliced); // => [1, 2, 3]
console.log(original); // => [1, 1, 2, 3]
const unaltered = [1, 1, 3];
const altered = unaltered.with(1, 2);
console.log(altered); // => [1, 2, 3]
console.log(unaltered); // => [1, 1, 3]
ECMAScript 2023 (ES14)
console.log("Progit på blåtur 🤩")
node ./progitBlaatur.js
> Progit på blåtur 🤩
ECMAScript 2023 (ES14)
Hashbang Grammar
console.log("Progit på blåtur 🤩")
node ./progitBlaatur.js
> Progit på blåtur 🤩
#!/usr/bin/env node
console.log("Progit på blåtur 🤩")
./progitBlaatur.js
> Progit på blåtur 🤩




Historien til JavaScript
By Markus Rauhut
Historien til JavaScript
- 116