Assignment 1.1

Objective:Β In this checkpoint, you will apply your learning to solve a JavaScript Assignment.

Having started learning JavaScript, you are now well on your way towards becoming a highly skilled Web Developer!

To wrap up your first chapter in our program, we are asking you to complete four drills using JavaScript. You may submit all four drills in one Repl.it for this assignment. Tip: When you create your Repl.it, make sure to select β€œJavaScript” as your language and title it β€œ[Your Initials] DDLA JavaScript Drills Using Arrays & Conditionals” (e.g., SC DDLA JavaScript Drills Using Arrays & Conditionals).

Drill 1: Iterate an Array by writing a function that returns the sum of all the values within an array (e.g., [1,2,5] returns 8, [-5,2,5,12] returns 14). Make sure that you test your function with examples Arrays in your answer submission.

Example Solution Screenshots:

 

 

Drill 2: Find the Max value in an Array with multiple values by writing a function that returns the maximum number in the array (e.g., for [-3,3,5,7], the max is 7). Make sure that you test your function with an example Array in your answer submission.

Example Solution Screenshot:

 

 

Drill 3: Find the Average value in an Array with multiple values by writing a function that returns the arithmetic average of all the numbers in the Array. (e.g., for [1,2,3,4,5], the average is 3). Make sure that you test your function with an example Array in your answer submission.

Example Solution Screenshot:

 

 

Drill 4: Report Card Statement Generator by writing a function with conditionals for how a specific number grade that falls within a score range generates a report card statement according to the following table:

Score Range Report Card Statement
Greater Than or Equal to 90 but Less Than or Equal to 100 You are an A-level student, way to go!
Greater Than or Equal to 80 but Less Than 90 You are a B-level student, a little more effort and you will get there!
Greater Than or Equal to 70 but Less Than 80 You are a C-level student, spend more time in study halls!
Greater Than or Equal to 60 but Less Than 70 You are a D-level student, please prepare a study plan!
Less Than 60 Please study harder, you have a long way to go!

Make sure that you test your function with an example number grade in your answer submission.

Example Solution Screenshot:

 

 

Note: This assignment should take you about 2.5 HOURS to complete. If you encounter any issues, please review the previous checkpoints or do some research on the internet using resources such as MDN and/or StackOverflow. Be sure to talk about this assignment and any other questions or findings you have during your next mentor call. Good luck!

Submitting your Assignment

Once done, simply post your Repl.it link to your Mentor over Slack.

Also, if you have any doubts or if you are stuck, feel free to message your Mentor!