best way to select first element in array javascript code example Example: javascript get first element of array alert(ary[0])