Question: Javascript Question E) Write a function named sumNumbers that accepts a nonnegative number, adds up all of the numbers between 0 and the number (inclusive),
Javascript Question
E) Write a function named sumNumbers that accepts a nonnegative number, adds up all of the numbers between 0 and the number (inclusive), and returns the sum. Use a while loop to solve this problem.
Example: sumNumbers(3) => 6 sumNumbers(6) => 21 sumNumbers(0) => 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
