Here is an example of a JavaScript function that returns true or false:

function isEven(number) {
  if (number % 2 === 0) {
    return true;
  } else {
    return false;
  }
}

This function takes in a number as an argument and checks if it is even. If it is even, the function returns true. If it is odd, the function returns false.

get function retrun true false js

原文地址: http://www.cveoy.top/t/topic/ZMx 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录