Account
Categories

Linting Tools (Debugging Tool


Definition:

It helps you find mistakes in your program, like syntax errors, wrong variable names, coding style issues, or wrong values, and lets you fix them.

If you use this tool in your program, it checks your code before running.

If there is a mistake, it gives a warning message, so you know there is an error and can debug it.

Now you will clearly understand the code with the help of the flowchart:

Start
 |
 v
Step 1: Write your program
 |
 v
Step 2: Turn on / use a Linter
 |
 v
Step 3: Linter checks your code
(line by line)
 |
 v
Step 4: Does it find any mistakes?
 |
 |–– Yes → Shows warnings or errors
 |              |
 |              v
 |      Step 5: Fix the mistakes
 |
 |–– No → Code is correct
 |
 v
Step 6: The Program becomes clean and error-free
 |
 v
End
  

Example:

let name = "John"
console.log(Name); // It shows that 'Name' is not defined in the program.