Rest operator

by Pritesh Patel

JavaScript

const product = (...rest) => rest.reduce((acc, number) => {
    return acc * number
  }, 1)