![]() ![]() Attempting to access an array item that does not exist.Dividing by a variable that has been set to zero.□ See what tools you can use to debug applications and find the cause of a problem right here ✅ Click to Tweet Runtime (or Execution) ErrorsĪn error only becomes evident when the application is executed, which often leads to a crash. It's inevitable: your Node.js code will fail at some point. Calculations that fail to account for operator precedence, e.g.For example, a user is not logged out when they request it a report shows incorrect figures data is not fully saved to a database etc. ![]() Your code runs but does not work as you expect. …but it’s easier to use an editor plugin such as ESLint for VS Code or linter-eslint for Atom, which automatically validate code as you type: ESlint in VS Code. You can check JavaScript files from the command line using: eslint mycode.js ESLint is a Node.js tool you can install globally with: npm i eslint -g Basic syntax problems can typically be spotted before you save and test your code.Ī code linter like ESLint will also report syntax errors, bad indentation, and undeclared variables. Auto-completing function and variable namesįree editors such as VS Code and Atom have great support for Node.js, JavaScript, and TypeScript (which transpiles to JavaScript).Color-coding valid or invalid statements.Your code does not follow the rules of the language - for example, when you omit a closing bracket or misspell a statement such as console.lag(x).Ī good code editor can help spot common problems by: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |