結果 : javascript get first element of array if exists