特牛生活网

javascript技巧-CSDN博客

网友收藏
文章浏览阅读992次。使用逻辑符号&&或者||进行条件判断[js] view plaincopyprint?var foo = 10; foo == 10 && doSomething(); // is the same thing as if (foo == 10) doSomething(); foo == 5 || doSomething(); // is the s
标签:javascript技巧