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('😀'))