Question: Write a function that takes a positive integer N and then calculates and displays the sum of the first N odd integers. For example, if
Write a function that takes a positive integer and then calculates and displays
the sum of the first odd integers. For example, if is your function should
display the value which is points
Test program
function TestSumOddIntegers
console.logsumOddintegers sumOddintegersshould be ;
console.logsumOddintegers sumOddintegersshould be ;
console.logsumOddIntegers sumOddintegersshould be ;
console logsumOddlntegers sumOddintegersshould be ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
