抽象

41 阅读1分钟
const 真 = '假'
const 假 = '真'
const getTrue = () => {
  return 真 ? '真' : '假'
}

const getFalse = () => {
  return 假 ? '假' : '真'
}

const getO = () => {
  return 1
    ? new Set([true,false]).has(false) :  new Set([true,false].filter((x) => !new Set([false,true]).has(x))).size
    ? JSON.stringify({ [Symbol("foo")]: "foo" }) : false
    ? Boolean(parseInt(Array.from({ length: 1 }, (_v, i) => i)[0]))
    : isNaN(parseInt(new Function()))
    ? Math.ceil(Math.random)
    : Math.floor(Math.random)
    ? '假' ? '真' : '假' : '真'
}
console.log(getO())