Professional Documents
Culture Documents
Question 1 In a regular array, access to an element is usually through the use of a(n) __________.
Correct
c. string
d. random number
Select one:
a. 1
c. 12
d. 0
Question 3 What is the result of the script below?
Correct <script>
Mark 1 out of 1 var n = ["Maria", "Isabella", "Georgina"];
var new_n = n.pop();
document.write(new_n);
</script>
Select one:
a. None of the choices
b. Georgina
c. Isabella
d. Maria
Question 4 Rather than executing every single line of code within the script, a conditional statement allows certain sections
Correct of the script to be executed only when a particular condition is met.
Mark 1 out of 1
Select one:
a. True
b. False
Question 6 Which of the following would be valid as the first line of an if/else statement?
Correct
b. if (y ! 7)
d. if (x=2)
Question 7 What is the result of the script below?
Correct <script>
Mark 1 out of 1 var n = ["Maria", "Isabella", "Georgina"];
n.shift();
n.unshift("Maria");
document.write(n);
</script>
Select one:
a. Maria,Isabela,Georgina
b. Isabela,Georgina,Maria
d. Maria,Isabela,Georgina,Maria
Select one:
a. None of the choices
b. Good day
c. Good morning
d. Good evening
Question 9 What property of the Array object will return the numeric value of the length of an array?
Correct
Question 10 What do you use to enclose the blocks of code in conditionals and loops?
Correct
b. Square brackets
c. Parentheses