Contact: aviboots(AT)netvision.net.il
39,855 questions
51,776 answers
573 users
function sum(x, y, z) { return x + y + z; } const arr = [3, 4, 5]; console.log(sum(...arr)); /* run: 12 */
function sum(a, x, y, z, b) { return a + x + y + z + b; } const arr = [3, 4, 5]; console.log(sum(-1, ...arr, 2)); /* run: 13 */