let level = $branches.switchCase(85, (switchCase) => { switchCase.add((it) => { return it >= 90 && it < 100 }, () => { return "优秀" }) switchCase.add((it) => { return it >= 80 && it < 90 }, () => { return "好" }) switchCase.add((it) => { return it >= 70 && it < 80 }, () => { return "良" }) switchCase.add((it) => { return it >= 60 && it < 70 }, () => { return "及格" }) switchCase.addDefault(() => { return "不及格" }) }) $console.log(level)