mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
919 B
25 lines
919 B
4 years ago
|
## Repeat
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Create a `repeat` function that takes a string and a number as parameters
|
||
|
and return the repeated string by the given number
|
||
|
Like the method [developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)
|
||
|
Of course you may not use the method directly
|
||
|
|
||
|
|
||
|
### Notions
|
||
|
|
||
|
- [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js)
|
||
|
- [nan-academy.github.io/js-training/examples/recursion](https://nan-academy.github.io/js-training/examples/recursion.js)
|
||
|
- [devdocs.io/javascript/global_objects/string/repeat](https://devdocs.io/javascript/global_objects/string/repeat)
|
||
|
|
||
|
|
||
|
### Code provided
|
||
|
|
||
|
> all code provided will be added to your solution and doesn't need to be submited.
|
||
|
|
||
|
```js
|
||
|
String.prototype.repeat = undefined
|
||
|
```
|