addup.html: adds up numbers until it sees 0

<script>
    var sum = 0;
    var num;
    num = prompt("Enter new value, or 0 to end");
    while (num != 0) {
    	sum = sum + parseFloat(num);
    	num = prompt("Enter new value, or 0 to end");
    }
    alert("Sum = " + sum);
</script>