update snippets 96-107
This commit is contained in:
@ -8,6 +8,9 @@ If no string is provided the default is `""` and the default number of times is
|
||||
const repeatString = (str="",num=2) => {
|
||||
return num >= 0 ? str.repeat(num) : str;
|
||||
}
|
||||
// repeatString("abc",3) -> 'abcabcabc'
|
||||
// repeatString("abc") -> 'abcabc'
|
||||
```
|
||||
|
||||
```js
|
||||
repeatString("abc",3) -> 'abcabcabc'
|
||||
repeatString("abc") -> 'abcabc'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user