<script> var x=15; var y=16; var sum=x+y; document.writeln("Sum ="+sum); </script>
For more information, visit the following link:
In the above example name and age are two variable and further we have assigned some value to it. Always remember that the variable name must be written in small letters. document.write (); is used to print the value of variable.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.