const obj = { foo: 1 };
obj.bar = 2;
let name = 'Harry';
let occupation = 'wizard';
console.log(`Hi! My name is ${name}. I'm a ${occupation}.`);
[...[...'...']].length
(function() {
if (false) {
let f = { g() => 1 };
}
return typeof f;
})()
typeof (function* f() { yield f })().next().next()
let titleElements = document.querySelectorAll('.article .title') let titles = Array.from(titleElements).map( t => t.textContent ); console.log(titles);
let a = 12, b = 3;
[a, b] = [b, a];