Question: 1 - Create an Array named trees with the following values: Sugar Maple, Red Maple, Red Oak, American Beech, Flowering Dogwood, Eastern Redbud 2 -
Create an Array named trees with the following values: Sugar Maple, Red Maple, Red Oak, American Beech, Flowering Dogwood, Eastern Redbud
Output the Array values using a for loop
document.writelnFor Loop Output:;
pop the last value and then output the Array using document.writelntrees;
push the value 'Magnolia' onto the Array and output it using document.writelntrees;
Output the length of the array using the length property
Sort the array and then output the all of the values
Create an array called numbers with the following values:
Use a loop to calculate average. Output the average using document.writeln
Use a loop to calculate sum. Output the final sum using document.writeln
Sort the array and output the values in numbers
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
