any help to solve this problem? i got stuck…
maybe its ridiculus but i cant
Use if - else statement to check the conditions for a and b and use return accordingly.
The existing code is all fine, you are simply adding code between the
// Only change code below this line
if(/* how do you write a block that checks if a OR b are less than zero? */){
return /* What are you to return if that check fails? */
}
// Only change code above this line
I got stuck on that too
I solve it.
If(a<0||b<0) {return " ";}
else …
This is the code
1 Like
Well, close. Instead of return ""
, they ask that you return undefined;
– undefined is a recognized javascript value for “no value at all”.
Thank you my friend for your help!
Can anyone help me with the lesson before: Replacing If Else Chains with Switch. Thank you