laika222
4/24/2017 - 5:48 PM

Create Variable and Write Value.html

//Basic variable declaration

<script language="javascript" type="text/javascript">
   
   var userName;              //Variable Declaration, introduces and declares variable
   userName = 'Telson Smith';   //Variable Initialization, gives value to variable
   document.write(userName);  //No quotes, outputs value of variable in ()

</script>