SPREAD and REST operator

What is Spread Operator in JavaScript?
What will be the output of following codes?

const arr = [1,2,3,4,5]

function add (a,b,c) {
  console.log(a+b)
}

add(...arr)
function add (...arr){
        let sum = 0;
        for(let i of arr){
            sum+=i;
        }
        console.log( sum );
    }