Closed JunShern closed 4 years ago
Change from else if to if. The same line can have both '{' and '}' characters, for example:
else if
if
} else if (true) {
In the above case, if we use 'else if' then we will miss counting the '}' and therefore our function will not close correctly.
Aha good catch! True true.. hadn't considered a single line function = that's some minimal + modular function writing!?
Change from
else if
toif
. The same line can have both '{' and '}' characters, for example:In the above case, if we use 'else if' then we will miss counting the '}' and therefore our function will not close correctly.