Javascript : Proses Berulang : Pernyataan For
Proses Berulang : Pernyataan For….
Script :
<HTML>
<HEAD>
<TITLE>Contoh for</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE = "JavaScript">
<!--
var bilangan = 0;
for (bilangan = 1; bilangan <= 5; bilangan++)
document.write(bilangan + "<BR>");
//-->
</SCRIPT>
</BODY>
</HTML>
Hasil :
0 komentar :
Posting Komentar