返回列表

~ and indexOf

默认分类 2013/10/08 21:04

http://www.javascriptturnsmeon.com/the-tilde-operator-in-javascript/

波浪号在javascript中的作用。妙!

str.indexOf(substr) != -1 <==> ~str.indexOf(substr)