Friday, August 16, 2013

JavaScript variable

<html>
<body>

<script type="text/javascript">
var firstname;
firstname="Munirul";
document.write(firstname);
document.write("<br />");
firstname="Hasan";
document.write(firstname);
</script>

<p>The script above declares a variable,
assigns a value to it, displays the value, changes the value,
and displays the value again.</p>

</body>
</html>

Result


No comments: