question archive JavaScript code to perform the following:   1)prompt user for a number using a prompt box between 10 to 40   2)Save this number into a variable   3)Validate the user input to ensure that a valid number range is entered ( if they entered the out of range then let the user know using alert() function and repeat your prompt until the user enter the right range

JavaScript code to perform the following:   1)prompt user for a number using a prompt box between 10 to 40   2)Save this number into a variable   3)Validate the user input to ensure that a valid number range is entered ( if they entered the out of range then let the user know using alert() function and repeat your prompt until the user enter the right range

Subject:Computer SciencePrice: Bought3

JavaScript code to perform the following:

 

1)prompt user for a number using a prompt box between 10 to 40

 

2)Save this number into a variable

 

3)Validate the user input to ensure that a valid number range is entered ( if they entered the out of range then let the user know using alert() function and repeat your prompt until the user enter the right range.

 

4)Write function called rand_array() which accept the number collected from user in step 2 and return an array of integers with random integersfrom 1 to 50. The length of the array must be the number you collected from user in step 2.

 

5)Write function called odd_avg_arr() to accept an array as input and find average of odd members of the array. EX: if an array is [1,3,4,5,6,7] Avg -> ( 1 + 4+ 6)/3 which is 3.66 You may use this example to test your function

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions