JavaScript executes your code accordingly even if you forget a semicolon at the end of the line.You must use a semicolon to separate the two pieces of code when putting two independent pieces of code on one line.