var compute = a => a * 3;
class Shape {
render() {
console.log("Shape");
}
}
class Triangle extends Shape {
render() {
super.render();
console.log("Triangle");
}
}
var shape = {
render() {
console.log("Shape");
}
};
var shape = {
width: 5,
height: 8,
};
var { width, height } = shape;
function log(message, ...data) {
console.log(message);
console.log(data);
}
log("ERROR", 3, "crash");
let x = "Bob";
let x = "Alice"; // <<
// ERROR: Duplicate declaration
const x = "Bob";
x = "Alice"; // <<
// ERROR: x is read-only
var s = new Set();
s.add("Bob");
console.log(s.has("Bob"));
var what = "World";
var result = `Hello ${ what }`;
(Template Strings)