October 2006
Beginner to intermediate
352 pages
9h 33m
English
The solution is:
var resultOfComp = (valA - valB) % 3 / 2 * (4 + valC) - 3;
The solution is:
switch(val) {
case 'one','two' :
result = 'OK';
break;
case 'three' :
result = 'OK2';
break;
default :
result = 'NONE';
}The solution is:
if ((varOne == 33) && (varTwo <= 100) && (varThree > 0))...
and 5. In for loops, you donât have to start at 0 or 1, and you also donât have to increment the number. Hereâs how to count upward between 10 and 20:
for (var i = 11; i < 20; i++) {
document.writeln(i + "<br />");
}And hereâs how to reverse the count:
for (var i = 19; i > 10; i--) {
document.writeln(i + "<br />");
}Read now
Unlock full access