摘要: 1.判断问题 如果type存在就设置type的值为type,否则设置type为0: 原始的写法,使用 if else:if(type){type = type} 使用三元操作符:type : type ? type : 0 使用"或": type : type || 0 · if(a){alert( 阅读全文
posted @ 2016-10-29 17:32 小番茄酱 阅读(297) 评论(0) 推荐(0)