Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add up all the numbers in between 0 and that number

function addUp(num) {
  if (num === 1) return 1;
  return num + addUp(num - 1);
}
 
PREVIOUS NEXT
Tagged: #add #numbers #number
ADD COMMENT
Topic
Name
8+7 =