ES6 - Use the Rest Parameter with Function Parameters

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

const sum = (x, y, z) => {
  const args = [x, y, z];
  let total = 0;
  for (let i = 0; i < args.length; i++) {
    total += args[i];
  }
  return total;
}

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1

Challenge: ES6 - Use the Rest Parameter with Function Parameters

Link to the challenge:

Did you have a question? It looks like you havent added any of your own code to complete this challenge. Let us know what difficulties you are having so we can help you better