i have write this code for perform simple action but not working at all
<script type="text/javascript">
var a = 10;
function add() {
window.setInterval(a2, 10000);
alert(a);
}
function a2() {
a = a + 2;
}
</script>
this alert in only returning value 10 only one time. how to achieve this working through timing and looping?