Exam 8: Javascript: Control Statements II

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What should you use as a counter in counter-controlled repetition

Free
(Multiple Choice)
5.0/5
(36)
Correct Answer:
Verified

C

What would the browser display if the following script were executed < script type = "text/javascript" > < !-- For ( var i = 0; var i < 5; var i++ ) Document.write( "X" ); //-- > < /script >

Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
Verified

A

The ________ multiple-selection statement is used to handle decision making and can be used to replace multiple if and if...else statements.

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
Verified

D

Which of the following is not required for counter-controlled repetition

(Multiple Choice)
4.9/5
(33)

What would the browser display if it executed the following script < script type = "text/javascript" > < !-- For ( var count = 0; count < 10; ++count ) { If ( count == 5 ) Continue; } Document.writeln( count ); //-- > < /script >

(Multiple Choice)
4.8/5
(31)

Which of the following will not evaluate to true

(Multiple Choice)
4.9/5
(39)

What would the browser display if the following script were executed < script type = "text/javascript" > < !-- For ( var i = 0; i < 5; i++ ) Document.write( "O" ); //-- > < /script >

(Multiple Choice)
4.7/5
(29)

What is the value of num after the following statements are performed Num = 2.4589; Num = num.toFixed( 2 );

(Multiple Choice)
4.8/5
(39)

What would the browser display if it executed the following script < script type = "text/javascript" > < !-- For ( var count = 1; count < = 10; ++count ) { If ( count == 5 ) Break; } Document.writeln( count ); //-- > < /script >

(Multiple Choice)
4.9/5
(33)

Consider the following code selections. Assume count is initialized to 7 and num is initialized to 0. I. ii) Do { while ( count < 6 ) Num = count; num = count; } while ( count < 6 ) What will the value of num be for i) and ii) respectively after the loops have been executed

(Multiple Choice)
4.9/5
(36)

In a switch statement, the ________ case clause is used to process exceptional conditions and is usually listed last.

(Multiple Choice)
4.9/5
(26)

What would the browser display if it executed the following script < script type = "text/javascript" > < !-- Var i = 0; Do { Document.write( "O" ); I++; } while ( i > 5 ); //-- > < /script >

(Multiple Choice)
4.9/5
(37)

Switch statements contain ________ labels.

(Multiple Choice)
4.9/5
(39)

Which of the following will not evaluate to false

(Multiple Choice)
4.8/5
(27)

What is the value of num after the following statement is performed Num = 2 * Math.pow( 2, 3 );

(Multiple Choice)
4.7/5
(40)
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)