Is there a String#indexOf equivalent that counts code points (not code units), or do you have to enumerate the string yourself using String.prototype[@@iterator] (eg using for...of)?
console.log('๐งd๐'.indexOf('๐')) // 3!
>Solution :
Try this:
console.log([...'๐งd๐'].indexOf('๐'))