Are semicolons required at the end of a statement?

Explicitly providing semicolons at the end of statements is usually not required, but recommended to prevent bugs in certain edge cases.

What is "strict mode", and how to enable it?

Strict mode changes the normal, "sloppy" JavaScript behavior in certain aspects. Most notably, it throws errors for mistakes that would otherwise be silently ignored, such as assignments to variables that have not been defined yet.

// write this as the first line to enable strict mode for the whole script:
"use strict";
Are semicolons required in strict mode?