for()
for() loops are mostly used to execute a command a certain number of times.
Syntax
- Block are separated by
;. - Multiple values in one block are separated by
,. - The start value is usually called
i.
Examples
//write Example four times
for(i=0; i<4; i++){
document.write("Example <br/>");
}