const obj = { foo: 1 };
obj.bar = 2;
const speed = 'quick'; `The ${speed} brown fox jumps over the lazy dog.`
let x, { x: y = 1 } = { x }; y;
(function() {
let f = this ? class g { } : class h { };
return [ typeof f, typeof h ];
})();
[...[...'...']].length
typeof (new (class F extends (String, Array) { })).substring
typeof (function* f() { yield f })().next().next()
let some_text = "some string";
if(some_text.indexOf('str') !=-1){
return true;
}
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];
const [a, , b] = [1, 2, 3];
console.log(a, b);