repeat Summary Repeats the string the specified number of times. Usage public string repeat(int times) Returns A new string with the original string repeated for the specified number of repititions. Parameters times The number of repititions to repeat the string. Description Repeats the string the specified number of times. If the specified repititions is negative, it will be treated as a zero (0) value. Examples Basic Usage 1234import System; string star = "*";Console.log(star.repeat(5)); // "*****" Share HTML | BBCode | Direct Link