So the plan is to have a string such as "a" in the slice, and once that turns into "a100" for example then stop running a for loop which is adding numbers to the end of it. When I try the code below it says "(mismatched types []string and string)", is this because I have to convert the slice into a string? If so, how do I do that? Thanks.
package main
import "fmt"
func main() {
var s []string
s = append(s, "a")
fmt.Println(s)
for i := 0; i <= 1000; i++ {
s = append(s, i)
if s == "a10" {
fmt.Println("Worked", s)
} else {
fmt.Println(s)
}
}
}