Question: 1 - Create an Array named trees with the following values: Sugar Maple, Red Maple, Red Oak, American Beech, Flowering Dogwood, Eastern Redbud 2 -

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