Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript multiplier function

function multiplier(factor) {
	return (x) => x * factor;
}

let doubler = multiplier(2);

console.log(doubler(5));

// prints: 10
 
PREVIOUS NEXT
Tagged: #Javascript #multiplier #function
ADD COMMENT
Topic
Name
4+6 =