The solution for 2.3 and 2.4 triangels – thanx to adaptives
2.3
The <br /> tag must be quoted to work.
The <br /> tag must be quoted to work.
<script type="text/javascript">
var line = "";
var counter = 0;
while (counter < 10) {
line = line + "#";
document.write(line + "<br />");
counter = counter + 1;
}
</script>
2.4
The curly braces must be added, or else it will output only once.
The curly braces must be added, or else it will output only once.
<script type="text/javascript">
var number = "";
for (var times = 0; times <10; times = times + 1) {
number = number + "#";
document.write(number + "<br />");
}
</script>
glenn.hellquist@gmail.com
webbkraft.com
/*#p2pu-Jan2011-javascript101*/
Inga kommentarer:
Skicka en kommentar