JSFiddle - React, Tailwind, and code Playground
by WK_of_Angmar
HTML
<div id="result"></div>
JavaScript
var total = 0, i = 5;
while (i > 0) {
var input = prompt("Gimme a number. " + i + " left to go.");
if (input < Infinity) { total += parseInt(input); i--; }
}
document.getElementById("result").innerHTML = "Total: " + total;