function restOp(firstNum, ...args) { let result = []; for (let i in args) { const multi = firstNum * args[i]; result.push(multi) } return result; } console.log(restOp(3, 2, 3, 5)); //Output:[ 6, 9, 15 ]