<meta charset="UTF-8">
<script>
function pulaLinha() {
document.write("<br>");
}
function mostra(frase) {
document.write(frase);
pulaLinha();
}
var i = 0
var limite = 10
while( i < limite){
mostra(i)
i = i + 1;
}
mostra("FIM")
</script>