how to debug javascript

JavaScript
console.log("the value of VARIABLE is:", VariableName)
Source