return exit the function, your loop would execute only once. You can create a string or an array of strings with the various repetitions, return that, and in this case you can print the resulto of the function with the various repetitions
Iâve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
See this post to find the backtick on your keyboard. The âpreformatted textâ tool in the editor (</>) will also add backticks around text.