JavaScript

Type
MDN
Array
MDN
Date
MDN
Object
MDN
String
MDN
JSON
MDN
Set
MDN
RegExp
MDN
Destructuring Assignment
MDN
const
MDN
let
MDN
export
MDN

Begin files with:
'use strict';

const a = (param1, param2) => {
return param1 + param2;
}
const b = (param1, param2) => param1 + param2;

console.log(window.location.hash);
Results:
#array
Results will always be prefixed with #

Scroll to a part of the screen.
window.location.hash = '#object'

input = "a b c d e";
main(input) {
...
}
assert(expected, input) {
console.log(input);
actual = main(input);
result = expected === actual;
console.log(result);
if (!result) {
console.log(actual);
console.log(expected);
}
}
// Case 1
assert(expected, input);
// Case 2
assert(expected2, input2);
// Case 3
assert(expected3, input3);
Warning: querystring.stringify does not stringify deeply nested objects.

class Animal {
constructor() {
}
}
class Cat extends Animal {
constructor(props) {
super(props)
}
}

Last modified 3yr ago
Copy link
On this page
Resources
strict mode
Arrow functions: () => {}
String
UTF Support
window
window.location.hash
trailing commas
Simple Assert
querystring
Classes
Flow vs TypeScript
Alternatives
Frameworks
ORM