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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -