Kod:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var mesaj = prompt("Mesajı girin");
var sayi = prompt("Tekrar sayısı");
var i=0;
if (parseInt(sayi) % 2 == 0) {
while (i < sayi) {
********.write(mesaj + " ");
i++;
}
}
else {
while (i < sayi) {
********.write(mesaj + "<br>");
i++;
}
}
</script>
</head>
<body>
</body>
</html>