Nama : Lisa Yulinar Syavira
Kelas : S1-P3
NIM : 1117101503
Script html :
<!DOCTYPE html>
<html>
<head>
<title>Belajar Java Script || Tugas 3</title>
</head>
<body>
<script>
//variabel
var bintang; a = 1;
var b = 15;
var c = parseInt (b);
//isi
for(bintang = 1; bintang <= 15; bintang ++)
{
document.writeln("<br/>");
for (a = 1; a <= c - bintang; a ++)
{
document.write("");
}
for (a = 1; a < 1 + bintang; a ++)
{
document.write("☆");
}
document.writeln("<br/>");
}
</script>
</body>
</html>
Hasil :
Tidak ada komentar:
Posting Komentar