Question: Use Javascript Paart 1. Write a function that takes a positive integer N and then calculates and displays the sum of the first Nodd integers.

Use Javascript

Use Javascript Paart 1. Write a function that takes a positive integer

Paart 1. Write a function that takes a positive integer N and then calculates and displays the sum of the first Nodd integers. For example, if N is 4, your function should display the value 16, which is 1 + 3 + 5 +7. Part 2. Using the digitSum function as a model, define a function that takes a number and returns a number that contains the same digits in the reverse order. Part 3. Write a function drawPyramid(height) that draws a pyramid of stars of the specified height in which the width of each row increases by two as you move downward. Each of the rows should be centered with respect to the others. Thus, calling drawPyramid(8) should produce the following figure: ***** * **

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!