結果 : time complexity of findindex in javascript