Variables in JavaScript

Free Web development courses with real-time projects Start Now!!

Program 1

<html><head><title>Test Java Script variables</title>
  <script lang="javascript">
    var a,b;
    a=60;
    b=20
    c=a+b
     document.write("<font color=red size=10>")
     alert(c)
     document.write("<br>")
     document.write(b)
     document.write("<font>")

  </script>
</head>
<body>
<h1>Test variable Code</h1>
</body>
</html>

 

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *