Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a javascript function named calculateTradeIn that can do the following cal

ID: 657987 • Letter: W

Question

Write a javascript function named calculateTradeIn that can do the following calculation:

Calculate the average miles per year for the car. For example, a five year old car with 90,000 miles would average 18,000 miles per year. If the car averages more than 15,000 miles per year, deduct $1700 from the trade-in value. If it is less than 7000 miles per year than add $900.

Each car model has a base price. Cruze is $16,170, Malibu is $22,465, Impala is $27,060, Camaro is $30,200, and Corvette is $48,500

Explanation / Answer

<!DOCTYPE html>

<HTML>

<HEAD>
<SCRIPT>

Var total=0;

if(document.getElementByid(

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote