Yes, the specification says that the return without a token on the same line counts as a single statement, and a return without an expression yields undefined. I don’t normally wrap my lines, but my motivation for writing this was a situation in which I had four clauses in a complex logical expression that I wanted to comment. I broke them apart and ran into the error I describe above. I won’t do that again!
]]>function isBetween(lo, hi, x) {
return lo <= x &&
x <= hi;
}
Then, isBetween(0, 10, 5) will return true.
It seems that the return statement must have something after ti.
]]>