前端基础Javascript数据类型基本类型Number奇偶数On this page奇偶数方法 1if ((x&1) === 0) { // 偶数} else { // 奇数}方法 2if (x%2 === 0) { // 偶数} else { // 奇数}参考判断奇偶数的两种方式