Answers for "Returning Boolean Values from Functions"

1

Returning Boolean Values from Functions

function isLess(a, b) {
	//avoid this code
  if (a < b) {
    return true;
  } else {
    return false;
  }
  // There is a better way to do this
  return a < b;
 
}
Posted by: Guest on July-18-2020

Code answers related to "Returning Boolean Values from Functions"

Code answers related to "Javascript"

Browse Popular Code Answers by Language