Click on the correct response for each question below.
 |
1 |  |  Which of the following statements is true about JavaScript: |
|  | A) | It is not a scaled down version of Java |
|  | B) | It is not Java |
|  | C) | It is not related to Java |
|  | D) | All of the above |
|  | E) | None of the above |
 |
 |
2 |  |  Client-side JavaScript extends the core language by supplying _____ to control a browser: |
|  | A) | Elements |
|  | B) | Files |
|  | C) | Objects |
|  | D) | Variables |
|  | E) | Namespaces |
 |
 |
3 |  |  If you place a script in the <body> section of the web-page: |
|  | A) | The script will not be executed. |
|  | B) | The script is called an Event Procedure script. |
|  | C) | The scripts will not execute immediately. |
|  | D) | The script will be executed when the web page is being loaded. |
|  | E) | The script is known as "Instant script" |
 |
 |
4 |  |  In the in the following HTML document ________________
<html><head>
<script language = "JavaScript">
document.write("Hello Valda <br/>")
</script>
</head>
<body>
<script language="JavaScript">
document.write("Hello Misty!" + "<br/>")
</script>
<b> Enough of Hello</b>
</body>
</html> |
|  | A) | the scripts will NOT run because there cannot be multiple scripts in the same document. |
|  | B) | the scripts will NOT run because the system will not accept HTML tags like </br> inside the script Line 3 |
|  | C) | the first script will NOT run, because it is never called. |
|  | D) | The second script will NOT run because it is not an "Immediate" script. |
|  | E) | The scripts will run as intended, and the browser will display "Hello Valda" in the first line, "Hello Misty!" in the second line, and "Enough of Hello" in bold in the third line. |
 |
 |
5 |  |  In JavaScript, a function can take arguments in the form of _____ that are passed to it by a calling procedure: |
|  | A) | constants |
|  | B) | variables |
|  | C) | expressions |
|  | D) | All of the above |
|  | E) | None of the above |
 |
 |
6 |  |  Functions that give back a result, must use the _____ statement to give the result back: |
|  | A) | function |
|  | B) | return |
|  | C) | end |
|  | D) | begin |
|  | E) | None of the above |
 |
 |
7 |  |  ____ statements allow you to repetitively execute a line or lines of a script until a certain condition or criteria are met: |
|  | A) | Conditional |
|  | B) | Broken |
|  | C) | Functional |
|  | D) | Looping |
|  | E) | B and D |
 |
 |
8 |  |  You should use the ______ statement when you want to select one of many blocks of code to be executed: |
|  | A) | for |
|  | B) | switch |
|  | C) | while |
|  | D) | do, while |
|  | E) | All of the above. |
 |
 |
9 |  |  The following script will display _________
<script language="JavaScript">
var s, i
s=0
for(i=2;i<8;i+=2)
{
s+=i
}
document.write(s)
</script> |
|  | A) | 0 |
|  | B) | 4 |
|  | C) | 6 |
|  | D) | 12 |
|  | E) | None of the above |
 |
 |
10 |  |  Optimally, a(n) _____ can be used to specify the end of a JavaScript statement: |
|  | A) | period ( . ) |
|  | B) | comma ( , ) |
|  | C) | bracket ( } ) |
|  | D) | exclamation ( ! ) |
|  | E) | semi-colon ( ; ) |
 |