Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript factorial with closure

function calcularFatorial(num) {
  return num > 1 ? num * calcularFatorial(num - 1) : 1;
}
 
PREVIOUS NEXT
Tagged: #javascript #factorial #closure
ADD COMMENT
Topic
Name
7+2 =