Variables are declared with the var keyword as follows.
<script> <!-- var rank; var points; //--> </script>
You can also declare multiple variables with the same var keyword as follows −
<script> <!-- var rank, points; //--> </script>
This is also you can assign values −
var rank = 2; var points = 100;