Home  >  Article  >  Web Front-end  >  js奇偶数判断的代码_javascript技巧

js奇偶数判断的代码_javascript技巧

WBOY
WBOYOriginal
2016-05-16 19:14:121607browse

有两个变量 a 和 b 
如果a=1,3,5,7,9 则b="奇数"
如果a=2,4,6,8  则b="偶数"
如果a="0" 则b="零"


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn