Question: Write a function max 3 that returns the largest of its three arguments. When I grade, I'll write my own test program with different inputs

Write a function max 3 that returns the largest of its three arguments. When I
grade, I'll write my own test program with different inputs of course. You can
try different test inputs too. (3 points)
/* Test program */
function TestMax3(){
console.log("max3(1,2,3)->"+ max3(1,2,3)+"(should be 3)");
console.log("max3(1,3,2)->"+ max3(1,3,2)+"(should be 3)");
console.log("max3(2,1,3)->"+ max3(2,1,3)+"(should be 3)");
console.log("max3(2,3,1)->++ max3(2,3,1)+"(should be 3)");
console.log("max3(3,2,1)->"+ max3(3,2,+"(should be 3)");
console.log('max3(3,1,2)->"+ max3(3,1,2)+"((should be 3)");
console.log("max3(2,2,1)->"+ max3(2,2,1)+"(should be 2)");
console.log("max3(4,4,4)->"+ max3(4,4,4)+"(should be 4)");
}
Write a function max 3 that returns the largest

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 Programming Questions!