javascript开发小技巧

来源:互联网 发布:软件测试好吗 编辑:程序博客网 时间:2024/05/02 04:15

1. ~取反操作

"string".indexOf("s") === -1 这类判断可以等价于!~"string".indexOf("s")

原创粉丝点击