const obj = { foo: 1 };
obj.bar = 2;
let name = 'Harry';
let occupation = 'wizard';
console.log(`Hi! My name is ${name}. I'm a ${occupation}.`);
(function() {
let f = this ? class g { } : class h { };
return [ typeof f, typeof h ];
})();
[...[...'...']].length
(function() {
if (false) {
let f = { g() => 1 };
}
return typeof f;
})()
const PI = 3.14;
console.log(PI) // Imprime 3.14
class Slave { // ... };
const slave = Slave();
const [a, , b] = [1, 2, 3];
console.log(a, b);