上一页 1 ··· 17 18 19 20 21
  2019年11月16日
摘要: 1.判断undefined: var tmp = undefined; if (typeof(tmp) == "undefined"){ console.log("undefined"); } 说明:typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、" 阅读全文
posted @ 2019-11-16 12:22 幂次方 阅读(459) 评论(0) 推荐(0)
  2019年11月13日
摘要: ?? 判断左侧的变量是否丢失,相当于java中的null的判断,或者这个变量是否未定义。?has_content 非常像??,但是它同时也会对空字符串或空list或空map进行判断。! 用来给变量一个默认值,例如color!”no color”?if_exists 是??的老写法,现在不推荐使用。 阅读全文
posted @ 2019-11-13 15:27 幂次方 阅读(977) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21