How can add value to variable

we can use += operater to add a value to varable

For example

<p id="test">  </p>

<script>

var a;

a=10;
a+=10;

document.getElementById("test").innerHTML=a;




</srcipt>