JJavaScript returns undefined if curly brace is on next line
08/28/2018 — 1 Min Read — In JavaScript
Semicolons are optional in JavaScript. If you do not open a brace or add your return object to the same line as the return statement, JavaScript will interpret this as desiring to return undefined. This behavior trips up a lot of developers coming from languages where the standard is to add the…