0

i am trying to create a function that will use parameters and return them. I want it to print a certain letter, say C a certain amount of times. So if i called the function(5) it would be CCCCC.

Sorry for the simple question, im new to coding so if someone could explain how this is done then i will be very greatful

1 Answers1

1

Just use this:

var char = 'C';
char.repeat(5)