Question: Question 1) What does a browser do when it encounters the following code in a web page? document.write( It works!); A) displays It works! in
Question 1)
What does a browser do when it encounters the following code in a web page?
| A) displays It works! in a web page |
| B) displays an error message because there is an invalid tag |
| C) displays document.write( "It works!"); because there is an invalid tag |
| D) the browser closes |
| E) | none of the above |
Question 2)
Which of the following choices are names for built-in JavaScript objects?
| A) document |
| B) window |
| C) document AND window |
| D) document, window, and script |
| E) document, window, and var |
Question 3
Which of the following is NOT the name of a method for the window or document objects?
| write() |
| prompt() |
| alert() |
| syntax |
| all of the above are methods for either the document or window object |
Flag this Question
Question 4)
Which of the following is NOT a JavaScript operator?
| A) | + |
| B) | . |
| C) | += |
| D) | = |
| E) | all of the above are operators |
Question 5)
What is displayed when the code below is placed inside of
| A) | nothing |
| B) | 3 |
| C) | x |
| D) | x = 3 |
| E) | var x = 3; |
Question 9)
What is the value of x after this code is executed? (It is inside SCRIPT tags). var y = 2; x = 1 + 2 * y + 3;
| A) | 0 |
| B) | 8 |
| C) | 9 |
| D) | 11 |
| E) | 15 |
Question 101 pts
What is displayed by the program below? (It is inside SCRIPT tags). var x = 3; var y = 4; document.write( (x + 1) ^ (y - 1) ;
| A) | 256 |
| B) | 81 |
| C) | 64 |
| D) | 9 |
| E) | nothing because there is a syntax error |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
