function isLess(a, b) {
// Fix this code
switch(a,b){
case (a<b):
return true; /*case (a<b) nto returning true*/
break;
default:
return false;
}
}
// Change these values to test
isLess(10, 15);
switch evaluates an expression, and the case statements are different possible results.
switch(a, b) is not valid. What you want inside of switch is the expression you are checking. If you want to check whether or not a is less than b, that would go inside of switch and each case would be the possible results and then what to do in those cases.