I tried to create a code that adds 2 percent each time a component is loaded in, but instead of showing that number increment, I get NaN. Why is that?
//Define variable
var PercentLoaded = 0;
//When a component loads
var PercentLoaded = PercentLoaded+2;
//Print value
$('#LoadProgressMessage').html('<h6>'+ PercentLoaded + '% Loaded</h6>');
Thanks for all your help everybody!
Try not to redeclare your variable when you increment it :