• + 0 comments

    using filter

     // Complete the function
        const largest = Math.max(...nums)
        const replacedLargest = nums.filter(num => num !== largest)
        return Math.max(...replacedLargest)