美图齐众专注资阳网站设计 资阳网站制作 资阳网站建设
资阳网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

让人抓狂匪夷所思的4组代码

1.确保这个值等于ture

 
 
 
  1. if (someBoolean == true) {  
  2. doSomething();  

2.只有等于ture时我才return ture

 
 
 
  1. if (result == true)  
  2. return true;  
  3. else 
  4. return result; 

3.我就是不信任if

 
 
 
  1. if (result <= 10) {  
  2. handling();  
  3. }  
  4. else if (result > 10) {  
  5. otherHandling();  
  6. }  
  7. else {  
  8. handling(); // to be sure  

4.要写出一看就懂的代码

 
 
 
  1. function DocumentDotWrite(s){  
  2. document.write(s);  

原文链接:http://www.aqee.net/horrible-code/


网站栏目:让人抓狂匪夷所思的4组代码
转载注明:http://www.zsjierui.cn/article/dhpjdde.html

其他资讯