Javascript - How To Pass An Object As a Parameter To a Function code example
Example: object as a parameter in javascript
var fac = function me(n) {
if (n > 0) {
return n * me(n-1);
} else {
return 1;
}
};
console.log(fac(3)); // 6