I know almost all browsers and Node installations support it, but Node 11 doesn't, and I kinda need that right now. So enjoy!
// Useable just like the normal matchAll:
let data = "Hello World!";
let rx = /[A-Z]/g;
let matches = [...data.matchAll(rx)];
console.table(matches);
/* Expected output:
┌─────────┬─────┬───────┬────────────────┬───────────┐
│ (index) │ 0 │ index │ input │ groups │
├─────────┼─────┼───────┼────────────────┼───────────┤
│ 0 │ 'H' │ 0 │ 'Hello World!' │ undefined │
│ 1 │ 'W' │ 6 │ 'Hello World!' │ undefined │
└─────────┴─────┴───────┴────────────────┴───────────┘
*/
this code dont work, it goes in an infinite loop