What does JavaScript 'error handling' even mean??

preview_player
Показать описание
This is part of my Frontend Web Development Course for Beginners. Learn the basics of HTML, CSS, and JavaScript to build a solid foundation for web development.

You can find resources and other information for this video at the Full Stack Foundations link below:

-------------------------------------------------------------------------------------

Connect with me:

-------------------------------------------------------------------------------------

Timestamps:

0:00 Why Error Handling?
2:52 ReferenceError
3:55 SyntaxError
4:46 TypeError
6:46 try / catch block for error handling
10:08 NaN data type
12:52 null data type
14:39 undefined data type
Рекомендации по теме
Комментарии
Автор

@8:57 you give us some code to catch the error and printy out information about it. This is the code I copied and pasted from my local webpage and pasted into the console <tldr>:


try{
var myNum = 40;
myNum.toUpperCase();
}catch(error){
console.log(error instanceof TypeError);
console.log(error.message);
}

and this gave me a syntax error at 5:19 so it's the instanceOF line but I cannot see the error. Now I know no one has answered any pf my other questions but would someone please tell me what the error is as I cannot see it.

Thankyou.

vaughanmacegan