Variables and Data

Variable is used to store or declare user's data from any type of input source. Such as data recieved or submit from input boxes or another input elements. So variable has a name and value.

Example: 
<script type="text/javascript">
var name = "Hege"
document.write(name)
document.write("<h1>"+name+"</h1>")
</script>


Example 2:
var name = "Sarib Ali";
var b = "123456";
var email = "aaaa@aaa.aaa"


No comments:

Post a Comment