system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
loloid |
Hi,
I can’t find a function that help me find a value in an array.
I have a basic array and i want to return the 2nd or 3rd (not the first or last) value in it.
Basically, i know the index, how do i know the value ?
Thanks for your help,
loloid
P.S : sorry if my english is bad, i’m not a native speaker
system
2
|
|
|
|
Reply From: |
kidscancode |
var array = ["a", "b", "c", "d"]
Arrays are indexed from 0
, so if I want the second value:
var x = array[1] # returns "b"
The details of working with arrays are documented here: