What alert will display on the screen? function test(a, b) { if(a > b) { return a*b; } else { return b / a; } } alert(test(5, 15)); What alert will display on the screen?
10/25/2017 12:11:32 PM
Adam Książek10 Answers
New AnswerHere is the explanation : // Global function declaration function test(a, b) { if(a > b) { // if a is greater than b return a*b; // number alerted 5*15 = 75 } else { // if a is smaller than b or equal to b return b / a; // number alerted 15/5 = 3 } } alert(test(5, 15)); // called the function "test" by value
What alert will display on the screen? function test(a, b) { if(a > b) { return a*b; } else { return b / a; } } alert(test(5, 15)); / number alerted 15/5 = 3 } } alert(test(5, 15)); // called the function "test" by value so the answers will be "3"
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message