結果 : check if index of array exists javascript