test 2.docx - 6.1 In the following line the word document is a(n that resides in the computer\u2019s memory document.writeln(\u201cHello World\u201d c object 6.2

test 2.docx - 6.1 In the following line the word document...

This preview shows page 1 - 2 out of 2 pages.

6.1 In the following line the word document is a(n) ______ that resides in the computer’s memory. document.writeln(“Hello World”); c) object 6.2 In the following line, the word writeln is a(n) _________ that performs a task or action in the script. document.writeln(“Hello World”); d) method 6.3 Consider the following HTML5 code. <html> <script type = “text/javascript”> <!-- <!-- document.writeln(“Hello World”); --> //--> </script> </html> What would a browser capable of scripting display when executing this code?b) nothing 6.4 Which of the following statements would correctly print out the sentence “Hello World” in blue? d) document.write( “<p style = \”color: blue\”>”); document.write( “Hello World </p>”); 6.5 An alert dialog displaying the text “Welcome!” is created by calling _________.a) window.alert( “Welcome!” ); 6.6 Consider the following script. What is wrong with the following code? <script type = “text/javascript”> var firstNumber; thirdNumber; firstNumber = window.prompt(“Enter an integer”, “0”); secondNumber = window.prompt(“Enter an integer”, “0”); thirdNumber = firstNumber + secondNumber; </script> d) The word var must be placed before thirdNumber in line 3. 6.7 Which of the following is not a valid variable name?c) 12footage 6.8 What will the browser display if the following script is executed and the user enters 5 at both prompts? <script type = “text/javascript”> <!-- var firstNumber = window.prompt( “Enter an integer”, “0” ); var secondNumber= window.prompt( “Enter an integer”, “0” ); var thirdNumber; thirdNumber = firstNumber + secondNumber; document.write( thirdNumber ); //--> </script> d) 55 6.9 Whenever a value is placed in a memory location, the value________.c) replaces the previous value in that location 6.10 What is the result of the statement 17 % 5?b) 2 6.11 Which of the following sequences does not follow the rules of operator precedence? Assume that operators are evaluated in the order listed from left to right. b) parentheses, subtraction, modulus 6.12 What does the following expression evaluate to? ( ( 3 + ( 5 + 4 ) * 7 ) + 4 ) / 5 b) 14 6.13 Which of the following is not a valid JavaScript equality or relational operator?a) = 6.14 Which of the following operators associates from right to left?b) = 7.1 A procedure for solving a problem in terms of the actions to be executed and the order in which these actions are to be executed is called ________.d) an algorithm 7.2 Specifying the order in which programming statements are to be executed is called ________.a) program control 7.3 ________ is an informal language that helps programmers develop algorithms.c) Pseudocode 7.4 A program in which all statements are executed one after the other in the order in which they are written exhibits ________.c) sequential execution 7.5 The word sequence in the term sequence structure refers to the sequence of ________.b) JavaScript instructions in a script 7.6 Research determined that all programs could be written in terms of only three control structures. Which of the following is not one of the three control structures?a) goto-less structure 7.7 Which of the following flowchart symbols indicates that a decision is to be made?a) diamond 7.8 Which of the following is
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Fall '08
  • ZHANG
  • Subroutine

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes