Iterate over indices of codepoints in JavaScript string
How can one iterate over the indices of codepoints and their values in a JavaScript string? For example, [...codepointIndices("H๐ello")] should output: [[0, "H"], [1, "๐"], [3, "e"], [4, "l"], [5, "l"], [6, "o"]] One can iterate over codepoints in JavaScript…