Assign one variable to another variable : Variables : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Variables »

 

Assign one variable to another variable

















<html>
<head>
<title>A Simple Page</title>
<script language="javascript">
<!--
yourname = prompt("What is your name?","Type your name here ...");
alert(yourname);

yourname2 = yourname;
alert(yourname2);

yourname = prompt("Type something different in","Something different ...");
alert(yourname);
alert(yourname2);
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Variables