Javascripttrepeat 1



Here is what the above code is Doing:
1. We’re creating a new string, which is the original string repeated n times.
2. We’re using the slice method to return a substring of the repeated string, starting from the 0th index, and ending at index n (but not including n).

Similar Posts