String.prototype.repeatbeginner'ab'.repeat(3) // β 'ababab'
'-'.repeat(5) // β '-----'
'x'.repeat(0) // β ''Use repeat() to create a new string with the original repeated a specified number of times.
str.repeat(count) returns a new string with str repeated count times.
Challenge: Implement repeatStr(str, n) that returns str repeated n times.
repeatStr('ab', 3) // β 'ababab'
repeatStr('x', 0) // β ''