Task 6 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

3.2 Methods — print n times

Total: 0 / 4 pts
Practice mode — check each part and get hints as you go.
Task

Fill in the body of printTimes so that it prints word on its own line, n times.

printTimes("hi", 3) prints hi three times. If n is 0, it prints nothing.

Your solution