1.确保这个值等于ture
- if (someBoolean == true) {
- doSomething();
- }
2.只有等于ture时我才return ture
- if (result == true)
- return true;
- else
- return result;
3.我就是不信任if
- if (result <= 10) {
- handling();
- }
- else if (result > 10) {
- otherHandling();
- }
- else {
- handling(); // to be sure
- }
4.要写出一看就懂的代码
- function DocumentDotWrite(s){
- document.write(s);
- }
原文链接:http://www.aqee.net/horrible-code/
网页名称:让人抓狂匪夷所思的4组代码
网站链接:http://www.mswzjz.cn/qtweb/news41/422241.html
温江区贝锐智能技术服务部_成都网站建设公司,为您提供网站策划、虚拟主机、做网站、网站建设、网页设计公司、网站设计公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 贝锐智能