Define variable and assign value : Variables : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Variables »

 

Define variable and assign value

















<html>
<head>
<title>Variable Demo</title>

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

var myVar;
myVar = "a string";
alert(myVar);

//-->
</script>

</head>
<body>

<h1>Variable Demo</h1>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Variables