laika222
10/28/2016 - 2:54 PM

Declares a variable. Line 2 introductes and declares variable userName. Line 3 initialized the variable and gives it the value "Telson Smith

Declares a variable. Line 2 introductes and declares variable userName. Line 3 initialized the variable and gives it the value "Telson Smith". Line 4 outputs the value of the variable.

<script language="javascript" type="text/javascript">
   var userName;  
   userName = 'Telson Smith';  
   document.write(userName);  
</script>