javascript get first string in array code example Example 1: javascript get first element of array console.log(ary[0]); Example 2: javascript get first element of array alert(ary[0])