I have occasionally seen (on stack overflow) code snippets that omit the braces in the else clause of the if statement. I had thought (for years and years) that this was invalid and all my recent research has supported this view, and I have edited them back in where I wanted to use the code snippet myself.
Then a year of so ago, without concentrating much I reused a segment of code from stack overflow on how to efficiently extract query string parameters from href.location that (without my noticing it) ended .... else return ; i.e. no braces around the else clause.
This has worked fine in both Firefox chrome and safari but I do not know why.
At the same time I realised that the else if clause is actually an else followed by a single if statement with no braces. Is this the same logic that you do not actually need braces around a single else clause statement?