Tell us what’s happening:
Hi, Can I use switch() to replace if-else loop in this case?
Your code so far
function isLess(a, b) {
// Fix this code
switch(a,b){
case:
a < b;
return true;
break;
default:
return false;
break;
}
}
// Change these values to test
isLess(10, 15);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions/