新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
讓人抓狂匪夷所思的4組代碼
1.確保這個值等于ture

- if (someBoolean == true) {
- doSomething();
- }
2.只有等于ture時(shí)我才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組代碼
轉(zhuǎn)載來源:http://www.dlmjj.cn/article/dhpjdde.html


咨詢
建站咨詢
