Professional Documents
Culture Documents
Select one:
a. Maria,Isabela,Georgina,Maria
b. Maria,Isabela,Georgina
d. Isabela,Georgina,Maria
Question 2 What property of the Array object will return the numeric value of the length of an array?
Correct
Question 3 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 4 What is the result of the script below?
Correct <script>
Mark 1 out of 1 var greeting;
var time = 10;
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
document.write(greeting);
</script>
Select one:
a. Good day
b. Good morning
c. Good evening
Question 5 Which of the following will correctly access the fifth element of an array named "age"?
Correct
b. age(5);
d. age[4];
Select one:
a. Isabella
b. Georgina
c. Maria
Question 7 What do you use to enclose the blocks of code in conditionals and loops?
Correct
c. Parentheses
d. Square brackets
Question 8 In a regular array, access to an element is usually through the use of a(n) __________.
Correct
b. random number
d. index number
Question 9 Which of these would be valid as the first line of a for loop?
Correct
b. for (x+=1;x<6;x=1)
c. for (x=1;x<6;x+=1)
d. for (x==1;x<6;x+=1)