04. throw expression
throw expression;
throw new Error(message);throw "Error2"; // string
throw 42; // number
throw true; // boolean
throw {
toString: function() {
return "I'm an object!";
}
}; // objectLast updated
throw expression;
throw new Error(message);throw "Error2"; // string
throw 42; // number
throw true; // boolean
throw {
toString: function() {
return "I'm an object!";
}
}; // objectLast updated