Skip to content

Files

Latest commit

dd17d8a · Oct 24, 2017

History

History

repeatString

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 24, 2017
Sep 20, 2017
Sep 20, 2017

README.md

Exercise 02 - repeatString

Write a function that simply repeats the string a given number of times:

repeatString('hey', 3) // returns 'heyheyhey'

hints

You're going to want to use a loop for this one.

Create a variable to hold the string you're going to return, create a loop that repeats the given number of times and add the given string to the result on each loop.