javascript - Difference between String.prototype.includes/contains in ES6? What about .has? -


i wondering of these methods become standard. i've seen both methods yield similar results, yet i'm not sure why there 2 versions/aliases. there difference among them? also, why did es6 use .has when could've used .contains or .includes serve multiple purposes under 1 name.

i aware .has isn't used on strings.

support tests:

        | contains      includes chrome  | no            yes firefox | yes           yes nodejs  | yes           no 


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -