| Refresh | Home EGTry.com

re-declare does not clear a variable


commentsJavascript sourceExecution result in your current browser
declare a variable
   var val;
   document.write(val);

initialize the variable
    val="some value";
    document.write("value="+val);

re-declare the value
    var val;
    document.write("value="+val);