String repeat() method

Find out all the information about the JavaScript repeat() method of the string

IntroducingES2015, Repeat the string the specified number of times:

'Ho'.repeat(3) //'HoHoHo'

If there is no parameter, or the parameter is0. If the parameter is negative, RangeError will be displayed.

Download mine for freeJavaScript beginner's manual


More js tutorials: