0

Answer javascript

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?

25th Oct 2017, 12:11 PM
Adam Książek
Adam Książek - avatar
7 Respuestas
+ 5
here is the answer function test() { /* some code */ }
16th Jun 2021, 5:14 PM
SANKARA NAARAYANAN
+ 4
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"
9th Apr 2020, 12:21 PM
Druide LEKOGHO
Druide LEKOGHO - avatar
+ 1
3
11th Nov 2022, 3:17 PM
Daniela Bulimar
Daniela Bulimar - avatar
0
Here 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
25th Oct 2017, 12:49 PM
RZK 022
RZK 022 - avatar
0
ty boi
25th Oct 2017, 2:26 PM
Adam Książek
Adam Książek - avatar
0
else
7th Jun 2020, 10:18 AM
Amanpreet Singh
Amanpreet Singh - avatar
0
if a else
29th Jul 2020, 2:16 PM
kedir.y
kedir.y - avatar