Sunday, 15 June 2014

javascript - Trying to make this loop documentwriteln properly, can't break lines and don't know how to number -



javascript - Trying to make this loop documentwriteln properly, can't break lines and don't know how to number -

this i've got far. i'm trying print vertically (a line in html every single output loop), , have respective integer attached each. this:

1. 638.33299939824 2. 648.23949999302 3. 649.19290102884 etc....etc...etc..

right prints this:

638.33299939824 648.23949999302 649.19290102884 etc.. etc... etc..

replace:

document.writeln(swag)

with:

document.writeln((i+1) + '. ' + swag + '<br />');

i'm using i+1, since i starts counting @ 0, seems want count 1, in html.

javascript

No comments:

Post a Comment