23.07.2013 Views

JavaScript/JScript: Control Structures I - Pearson Learning Solutions

JavaScript/JScript: Control Structures I - Pearson Learning Solutions

JavaScript/JScript: Control Structures I - Pearson Learning Solutions

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2008934301<br />

Chapter 14 <strong>JavaScript</strong>/<strong>JScript</strong>: <strong>Control</strong> <strong>Structures</strong> I 439<br />

EXERCISES<br />

14.9 Identify and correct the errors in each of the following. [Note: There may be more than one<br />

error in each piece of code.]<br />

a) if ( age >= 65 );<br />

document.writeln( "Age greater than or equal to 65" );<br />

else<br />

document.writeln( "Age is less than 65 )";<br />

b) var x = 1, total;<br />

while ( x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!