Help making a tabler in Javascript

Lord

All Mighty
Joined
Feb 11, 2011
Messages
15,476
Reaction score
11
Points
31
I don't know if i should put this here but i'm working with making javascript in HTML and in my class we're supposed to make a tabler using javascript.
I'm trying to make a tabler with number 2 and this is what my group made until now:
<html>
<body>
<script type="text/javascript">

var i=2;

for(i=2+1;i<=20; )
document.write("The Number is "+i*2);
document.write("<br/>");
}
</script>
</body>
</html>

I want it to appear this:
2*0= 0
2*1= 2
2*2= 4
2*3= 6
2*4= 8
2*5= 10
2*6= 12
2*7= 14
2*8= 16
2*9= 18
2*10=20

It must stop here, can somebody help me?
 
I already did some progresses:
<html>
<body>
<script type="text/javascript">

var i=0;

for(i=0;i<=20;i++)
{
document.write("="+i*2)
document.write("<br/>")
}
</script>
</body>
</html>

However what appears on screen is:
=0
=2
=4
=6
=8
=10
=12
=14
=16
=18
=20
=22
=24
=26
=28
=30
=32
=34
=36
=38
=40

how can i make it appear:
2x0=0
and so on?


Please i really need some help.
 

Users who are viewing this thread

Back
Top
monitoring_string = "afb8e5d7348ab9e99f73cba908f10802"