I don’t know what you want to do with that, but it doesn’t seem quite right
so you want to have the last number be the multiplier?
you need to do some weird stuff there, as there is not an easy cut out way, because that makes the multiplier be in an always different position
function toMulti (...numbers) {
let factors = numbers.slice(0, -1) // this takes the whole array without last element
let multiplier = numbers.slice(-1) // this copies last element of the array
}
something like that
you can find many ways but nothing will be as easy as to have the parameters as (factor, ...numbers)