0
Given the array below, please complete the expression to be alearted with"apple".
var fruits=new array("pear","orange","apple"," grapefruit"); alert(fruits............);
8 Answers
+ 8
fruits[2]
You should know how to access elements of an array, so I would suggest going through the tutorial or at least that part of it. Unless I didn't understand what are asking.
+ 3
alter(fruits[2]);
+ 2
var fruits = new Array("pear", "orange",
"apple", "grapefruit");
alert(fruits
[2]
);
0
yes
thank you đ
0
Given the array below, please complete the expression to be alerted with "apple".
var fruits = new Array("pear", "orange",
"apple", "grapefruit");
alert(fruits
[2]
);
0
[2]. bcoz of array starts to 0..
[0]-pear
[1]-orange
[2]-apple
[3] grapefruit
- 1
12 // number
"some text" //............
true // ............
- 1
[2]