Reassigning value to Variables : Variables : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Variables »

 

Reassigning value to Variables

















<html>
<head>
<title>Reassigning Variables</title>

<script language="javascript" type="text/javascript">
<!--

var myVar = 3;
alert("Variable myVar contains the value: " + myVar);
myVar = 2;
alert("Variable myVar contains the value: " + myVar);
myVar = 1;
alert("Variable myVar contains the value: " + myVar);
myVar = "Go!";
alert("Variable myVar contains the value: " + myVar);

//-->
</script>

</head>
<body>

<h1>Reassigning Variables</h1>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Variables