website development question and need the explanation and answer to help me learn.
-In each of the following code segments, locate the error and describe how to fix it:
a)
a = 5;
while ( a <= 20 );
++a;
}
b)
switch (n) {
case 1: document.writeln( "The number is 10" );
case 2: document.writeln( "The number is 20" );
break;
default:
document.writeln( "The number is not 10 or 20" );
break;
}
c) The following code should print the values from 0 to 5:
a = 0;
while (a < 5 )
document.writeln( a++ );
d)