Return Statements in JavaScript and Automatic Semicolon Insertion
Published in
2 min readMay 4, 2020
All developers writing JavaScript should understand automatic semicolon insertion as it relates to return statements.
JS uses automatic semicolon insertion. This means JS engines will execute code and insert any semicolons where it sees fit.
One of those spots is after a return statement.