Pure Functions in Javascript

Always returns the same output when given the same input, No side effect
function square(number) {
return number * number;
}
console.log(square(2));
// 4
Free Online Tutorial For Programmers, Contains a Solution For Question in Programming. Quizzes and Practice / Company / Test interview Questions.

Always returns the same output when given the same input, No side effect
function square(number) {
return number * number;
}
console.log(square(2));
// 4