Home of web learners

www.webn3rd.com

variable means where you can store your data and you can change data of variable

Javascript variable are easy to use,you don't have to declare data type of variable

Lets look an example:


        
<html>
<body>
    <script>
  
    var a = "hey,how are you?";
 
    
    document.write(a);
   
    </script>
</body>
</html>
          
          

output:

hey,how are you?

Its very easy to use,you have to give var before variable name and then assign the value,thats it.

Now you can use this variable,here we use in document.write which is used to show output,here we show a variable data

webn3rd.com

About webn3rd