10 lines
149 B
Go
10 lines
149 B
Go
package iteration
|
|
|
|
func Repeat(char string, n int) string {
|
|
var repeated string
|
|
for i := 0; i < n; i++ {
|
|
repeated += char
|
|
}
|
|
|
|
return repeated
|
|
}
|