Brendan Eichs kodenavn
Internt navn i Netscape
Brendan Eichs kodenavn
Offentlig navn
Internt navn i Netscape
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
Stage 1
Stage 0
Stage 2
Stage 3
Stage 4
Strawperson
Proposal
Draft
Candidate
Finished
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
.findLast()
const pgpPoeng = [1300, 1200, 1000, 950, 800];
const found = pgpPoeng.findLast((element) => element > 900);
console.log(found);
> 950
.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);
.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
.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]
console.log("Progit på blåtur 🤩")
node ./progitBlaatur.js
> Progit på blåtur 🤩
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 🤩