Kizspy | Question: 21
(Choose 1 answer)
var fruits, text="", i;
fruits ["Banana", "Orange", "Apple", "Mango"];
fruits [6] "Lemon";
for (i=0; i<7; i++) {
text += fruits[i] + "<br/>";
document.write(text);
What is the output of the above code?
A. Syntax error
B. Banana
Orange
Apple
Mango
undefined
undefined
Lemon
C. Banana
Orange
Apple
Mango
Lemon
D. Banana
Orange
Apple
Mango
null
null
Lemon