TypeScript – URLSearchParams iterator typing issue

In a certain React course in Udemy, I encountered an issue on React and Typescript where an iterator does not work the way it is shown in the course and this is probably because the course is not written in TypeScript, but in plain JavaScript.