Write a condition so that the loop displays stars as long as the counter value is smaller than the parameter rows.
counter
rows
Make sure to pick counter, followed by <, and finally rows.
<