[Go] Join strings with a separator

Created on November 30, 2026

strings.Join takes a slice of strings and a separator and returns a single string. This example puts a comma between each pair of adjacent items.

package main

import (
    "fmt"
    "strings"
)

func main() {
    fmt.Println(strings.Join([]string{"one", "two", "three"}, ","))
}
one,two,three
Go