## SAT Math Practice Test

Javascript Quiz # 2

The Second Javascript Quiz.

Q1. Which of these contains an executable statement?

A . // var x = 10; // var y = 0;
B . /* var x = 10; // var y = 0; */.
C . /* var x = 10; */ var y = 0;
D. // var x = 10; /* var y = 0; */

Q2. Assume that a function myfunction is defined at some place . Which of the following is NOT a valid function call?

A . var z = myfunction();
B . myfunction;
C . z = myfunction();
D. myfunction();

Q3. Assume that value of A is 10 and value of B is 15. Which of the following returns a true value in if statement.

A . if A not = B
B . if A != B
C . if (A not = B)
D. if (A != B)

Q4. Which of the following is not a builtin Javascript object?

A . Time
B . Array
C . Date
D. Math

Q5. What command skips the rest of a case statement?

A . return
B . exit
C . continue
D. break

Q6. How many parameters can be passed to one function?

A . none
B . as many as you like
C . one for each argument
D. one

Q7. Consider the following code for switch loop

```  case 10:
case 12:
```
What will run next if the value is 10?

A . the code following the case 12:
B . the code following default:
C . the code after the end of the switch
D. this is a coding error

Q8. What does ++ do?

A . Adds two numbers together
B . Joins two text strings together
C . Adds 1 to a number
D. Adds 2 to a number

Q9. What is correct about a method.

A . A method is the object oriented version of a function
B . A method is the object oriented version ofa variable
C . A method is the object oriented version ofa sequence
D. A method is the object oriented version ofa program

Q10. var a= 'Z'; var b = 32; a = b; Variable 'a' now contains?

A . text
B . a number
C . true
D. it is not possible to tell

Try other quizzes

Quiz #1

Quiz #2

Quiz #33