Assigning a variable, and printing the value in JavaScript

/*Assigning a variable, and printing the value in JavaScript*/

<html>

<head>

<title> Assigning a Variable </title>

<script language="javascript">

var a = 10;

function display()

{

    document.write("a =" +a);

}

</script>

</head>

<body>

<script>

display();

</script>

</html>


Output:

a = 5

Popular posts from this blog

Install Windows 7 Operating System - Practical

COPA Bits for Computer Based Test (CBT) by Venugopal Vanjarapu

COPA