function foo() {
bar() // A
} // B
After which line(s) does one usually put semicolons?
function foo() {} // A
const foo = function () {} // B
After which line(s) does one usually put semicolons?
while (a > 0) a-- // A
while (a > 0) {
a-- // B
} // C
Semicolon after:
function f() {
return
{
a: 1 // (A)
}
}
const result = f();
What happens?
const arr = Object.keys({a: 1, b: 2, c: 3})
[1].forEach(x => console.log(arr[x]))