This package can perform some operations on strings and arrays:
npm install jsmp-infrastucture-garbage-bagThis package can perform some operations on strings and arrays:
findElementIndex takes an array and a predicate function and return the index of the first array element for which the function returns true
``js
`
const array = ['max', 'ksysha', 'john'];
const isKsysha = person => person === 'ksysha';
findIndex(array, isKsysha) // -> 1
reverseString
takes a string and returns a reversed string
`js
``
const name = 'ksy';
const reversedName = reverseString(name);
reversedName // -> 'ysk'