Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 445 Bytes

File metadata and controls

29 lines (21 loc) · 445 Bytes

unary

A unary function is a function that takes one argument.

function increment(x) {
	return sum(x,1)
}

binary

A binary function is a function that takes two inputs.

function sum(x,y) {
	return x + y;
}

variadic

A variadic function is a function where the total number of parameters are unknown and can be adjusted at the time the method is called.

function f(...args) {
	console.log(args);
}