the if is wrong, i don't understand what happening in this is code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

the if is wrong, i don't understand what happening in this is code

Fill in the blanks to calculate the maximum of the parameters: function max(a, b) { if (a >= b) return a ; else return b; }

4th Nov 2023, 10:07 PM
Nmer Abrahim
Nmer Abrahim - avatar
1 Answer
+ 2
//The curly brackets are missing. Here’s the correct code: function max(a, b) { if (a >= b){ return a }; else{ return b }; }
5th Nov 2023, 12:14 AM
Annihilate
Annihilate - avatar