結果 : javascript only take first n elements of array