Skip to main content
Known Participant
May 9, 2015
Answered

array isue

  • May 9, 2015
  • 1 reply
  • 308 views

how can i trace letters inside an array:

for example if i have an array

var arr:Array = ["dogs", "cats", "oranges", "apples"]; 

i want to trace what is the third letter of second  word (cats)?

answer should be (t)

This topic has been closed for replies.
Correct answer Ned Murphy

trace(arr[1].charAt(2));

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
May 9, 2015

trace(arr[1].charAt(2));