Prototype Test
by grammar
HTML
<h3>
Create “native” methods
</h3>
<p>
Define a repeatify function on the String object. The function accepts an integer that specifies how many times the string has to be repeated. The function returns the string repeated the number of times specified. For example:
</p>
<pre>console.log('hello'.repeatify(3));</pre>
<p>
Should print hellohellohello.
</p>