JavaScript - Function arguments

A fiddle containing my practices of using function arguments!!

by Codi Bezouka-Smith

JavaScript

// Creating a function with a variable # of args 
var add = (a, ...nums) => nums.reduce(
	(runningTotal, n) => runningTotal + n, 0
);

/*
Why didn't we use a reduce function for the add() ???

	Arguments is actually an object, not an array, although
we can loop through it like an array.

Trying to create an arrow function with arguments?
	You CANNOT use arguments with arrow functions!!
	
=> Here is where the REST parameter comes in!
*/