javascript 偶数或奇数(如果使用模数的其他声明)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 偶数或奇数(如果使用模数的其他声明)相关的知识,希望对你有一定的参考价值。

let wordL = getLength('Hello World!');
if (wordL%2 == 0) {
    console.log('The world is nice and even!')
} else { 
    console.log('The world is an odd place!');
    
}

以上是关于javascript 偶数或奇数(如果使用模数的其他声明)的主要内容,如果未能解决你的问题,请参考以下文章