code only works on jsfiddle?
<p>I am learning JavaScript from a book and in a code example that I have written from the book it will only work for me on jsfiddle. I have tried Chrome and IE but the prompt does not appear. Here is my code:</p>

<pre><code>&lt;script type="text/JavaScript"&gt;
            var userNumbers = new Array();
            var userInput = 0;
            var arrayIndex = 0;
            var message = '';
            var total = 0;

            while (userInput != 99) {
            userInput = prompt("Enter a number, or 99 to exit", "99");
            userNumbers[arrayIndex] = userInput;
            arrayIndex++; 
            }
            message += 'You entered the following:\n';
            for (var i = 0; i&lt; arrayIndex-1;i++) {
                message += userNumbers[i] + '\n';
                total += Number(userNumbers[i]);
            }
            message += 'Total:' total + '\n';
            alert(message);
        &lt;/script&gt;
</code></pre>
