2 ms·
Also, if the argument to throw is omitted, then what value is thrown? Would it throw undefined?
by zzo38computer 6y ago
Also, if the argument to throw is omitted, then what value is thrown? Would it throw undefined?
- zzo38computer 6y agoActually, 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.