Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript debugging exercises

// js debugging exercises

// use const and let instead of var
const val1 = 69; // const for non changing values
let val2 = 420; // let for changing values

// use lots of console logs
console.log(val2, 't1')
/* manipulate val2 here */
console.log(val2, 't2')
// note: add some sort of string while console logging,
// so it becomes easy to find & remove logs when code is working

// use try...catch for catching errors
try {
  /* your code here */
} catch (err) {
  /* handle errors here */
  console.log(err, 'error')
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: xmlhttprequest object 
Javascript :: javascript union two sets 
Javascript :: axios defaults headers common 
Javascript :: json schema validator allows null 
Javascript :: nodejs sql syntax 
Javascript :: react hook form clear form 
Javascript :: angular countdown begin stop pause 
Javascript :: external css not working in jsp 
Javascript :: http module nodejs 
Javascript :: Javascript object convert into JSON 
Javascript :: 2d array javascript 
Javascript :: javascript check table not empty 
Javascript :: change array index position in javascript by up and down click 
Javascript :: document.queryselector picks first or last 
Javascript :: implement singleton javascript 
Javascript :: js object.entries with sort 
Javascript :: p5.js how to display a text from string 
Javascript :: js overflowx 
Javascript :: is promise 
Javascript :: use moment js in ejs file 
Javascript :: js reduce 
Javascript :: regex for not accepting zeros 
Javascript :: get min/max array 
Javascript :: js outputting data 
Javascript :: javascript wait for function to finish 
Javascript :: jquery autocomplete bootstrap modal 
Javascript :: list of alphabet letter english for js 
Javascript :: javascript access nested property by string 
Javascript :: javascript input value change 
Javascript :: axios delete request 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =