• + 0 comments

    Js

        function miniMaxSum(arr) {
            let sor = arr.sort((a,g)=> a - g)
            let min = (sor.slice(0,-1))
            let max = (sor.slice(1,))
            let one = min.reduce((q, r)=>q + r)
            let tow = max.reduce((q, r)=>q + r)
            console.log (one, tow)
    

    }