javascript get the first element of an array or undefined code example Example: how to display first value of an array in jquery alert(ary[0]);