📜  从函数返回布尔值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:51.201000             🧑  作者: Mango

代码示例1
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;
 
}