标签云

微信群

扫码加入我们

WeChat QR Code

Usually I would expect a String.contains() method, but there doesn't seem to be one. What is a reasonable way to check for this?


Not supporting IE is a feature though

2019年06月25日05分52秒

I don't like IE either, but if you have two functions that are largely identical, and one is better supported than the other one, I think you should pick the better supported one? So indexOf() it is...

2019年06月26日05分52秒

Just do "potato".includes("to"); and run it through Babel.

2019年06月26日05分52秒