Preview:
var arOverdueAmount = 56356; // This initializes the variable with the value 56356
var arOverdueAmount; // This declaration is ignored, as the variable already exists
console.log(arOverdueAmount); // Prints the value assigned earlier, which is 56356

var arOverdueAmount = 56356; // This initializes the variable with the value 56356
var arOverdueAmount = 10000; // This updates the value of the variable to 10000
console.log(arOverdueAmount); // Prints the updated value, which is 10000


If you declare a variable with the same name in the same scope but don't provide a new value, the existing value of the variable will remain unchanged.
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter