You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a wrong code in the Error Handling chapter. Refer to the image and code below:
try {
user = { /*...*/ };
} catch (err) {
if (err instanceof ReferenceError) {
alert('ReferenceError'); // "ReferenceError" for accessing an undefined variable
}
}
This should output as follows in a browser environment.
and, nothing should be there in the terminal in Node js env. as nothing is being returned or logged.
But, as per the website when you ran the code, it shows this: