How to find errors in JavaScript?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to find errors in JavaScript??

I use notepad and internet explorer browser to write and run js code but it is very difficult to find errors

28th Nov 2016, 6:40 AM
Bhuvanesh Desai
Bhuvanesh Desai - avatar
5 Answers
+ 1
all errors occurred in javascript are logged in javascript console it shows where error occurred type of error but be careful while using console as it says warning too specially cut paste or link
28th Nov 2016, 9:43 AM
Sandeep Chatterjee
0
just type -error
28th Nov 2016, 6:41 AM
script
0
where
28th Nov 2016, 6:41 AM
Bhuvanesh Desai
Bhuvanesh Desai - avatar
0
use inspect it's super useful just do control shift I and you will be able to see all of your errors
28th Nov 2016, 6:55 AM
Ian
Ian - avatar
0
Firstly, install a Google Chrome :D Next, use a developer kit, which use all browsers. For open Developer Tools click f12. Finally: If you are not sure in your code, use try..catch block or use a function like this : function(err) { f(err) throw err; //your Code }
28th Nov 2016, 11:55 AM
alexyork
alexyork - avatar