I cannot remember where, but recently I passed a comment where the user told that 1TBS is more preferred than Allman in JavaScript and said Allman has dangerous implications in JavaScript.
Was it a valid statement? If so, why?
Question&Answers:osI cannot remember where, but recently I passed a comment where the user told that 1TBS is more preferred than Allman in JavaScript and said Allman has dangerous implications in JavaScript.
Was it a valid statement? If so, why?
Question&Answers:osreturn
cannot have LineTerminator
after it so:
return
{
};
is treated as return;
(return undefined
) instead of return {};
(return an object)
See the rules for Automatic Semicolon Insertion (ASI)
for more.