Why does the value returned should be on the same line as the return statement in JavaScript? -
The following does not work because I expect:
function testing () {// Return to drawback, even if I thought it would return 1 return 1; } Obviously, the value should be on the same line: back 1; . Why can I write such things // 1 to fix foo, 1; ... but the return statement does not work the same way?
This is clearly part of the language. If this does not happen, then still should be return problems: if (some ()) return counter = counter + 1 ; Without a semicolon entry rule, which is missing the semicolon, it increases the behavior (which I argue) as weirdly now with return Has been new line
Comments
Post a Comment