Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
哪个更快?
arr.contains(val);
或者
$.inArray(val, arr);
有没有准确的测试方法?
如果您正在寻找一种简单的 JS 基准测试方法,我建议您使用 jsperf.com。