function firstBiggerThanMe(arr){ let firstBiggerArr = new Array(arr.length).fill(-1) for(let i = 0;i < arr.length - 1;i++){ let item = arr[i] for(let j = i + 1;j < arr.length;j++){ let jItem = arr[j] if(jItem > item){ firstBiggerArr.splice(i,1,jItem) break } } } return firstBiggerArr } firstBiggerThanMe([4,9,32,1,2,5,6,6,3,8,10,9])