News for hackers. Stuff that matters.
Re:Feature request for JavaScript: omit catch by zzo38computer on Friday April 16, 2021 @08:38PM (#26840612)
Also, if the argument to throw is omitted, then what value is thrown? Would it throw undefined?
Re:Feature request for JavaScript: omit catch by zzo38computer on Saturday April 17, 2021 @01:57AM (#26841925)
Actually, I suppose if the throw with no argument occurs in a catch block, then it can just rethrow whatever was caught (you might omit giving a name to the variable with the exception if the only thing you will do with it is to rethrow it); in other contexts, it could throw undefined.