JS 杂项

#1.

   +"1"

1
!!1
true
!!0
false   text="aaaa1111"
"aaaa1111"
pattern=/\d+/g//
  /\d+/g
text.search(pattern)
4
text.match(pattern)
  Array [ "1111" ]
text.replace(pattern,"2222")
"aaaa2222"
text.split(/\D+/)
  Array [ "", "1111" ]   0!==0
false
null!=undefined
false
null!==undefined
true
null==undefined
true
null===undefined
false   var s="1111";
function f(){
    console.log(s)
    var s='2222'
    console.log(s)
}
上一篇:原码 反码 补码


下一篇:TI小车中国基础版---走迷宫代码