I use js, jquery
Wrote the function contains(object, item, showCount) , which shows whether the item element is in the string or the object array, and if necessary it returns the number of repetitions of this element, getting showCount = true .
And suddenly I wanted to call something like this: Array.contains(item, showCount) , or so String.contains(item, showCount) .
Is it possible to call her like that? If there is, how?)