Question: //javaScript //this is the tracker function calcWalkCal(weight, distance) { return 0.3 * weight * distance; //requires weight in lbs, and distance in miles function calcRunCal(weight,

 //javaScript //this is the tracker function calcWalkCal(weight, distance) { return 0.3

//javaScript //this is the tracker function calcWalkCal(weight, distance) { return 0.3 * weight * distance; //requires weight in lbs, and distance in miles function calcRunCal(weight, distance) { return 0.63 * weight * distance; } // speed is whatever units the user wants to use function calcSpeed(distance, time){ return distance/time; } exports.calcWalkcal calcWalkCal; exports.calcRunCal calcRunCal; exports.calcSpeed = calcSpeed; var tracker require("./tracker/tracker Service.js": var activities = [ {activity: "walking", weight: 17, distance: 3, time: 45}, activity: "running", weight: 200 , distance: 4, time: 40}, {activity: "running" weight: 175, distance: 5, time: 45}, {activity: "running", weight: 140, distanc e: 10, time: 240}] Use a loop to walk through the array, using the functions provided by in tracker module to process each item and print the data to the console in the following format: !!Need to use the functions from the tracker!! Activity: 1 walking Weight: 170 lbs. Speed: miles per hour Calories Burned: 135 ********* Activity: 2 running Weight: 200 lbs. Speed: 6miles per hour Calories Burned: 504 *****

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!