3. property access


#1

how to log item at position [3] to console

var bucketList = ['pen' , 'car ' , 'dog'];
console.log(bucketList);
var listItem = bucketList[0];
console.log(listItem);
var listItem = bucketList [2];
console.log(bucketList);


#2

Can't, no such position in your array


#3

Thats what is required. But still it shows an error. It says "Did you set listItem to the first item in your bucketList array, using [3]? "


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.