how to delete the Element in slice using Slice Golang
vinay
Posted on October 20, 2022
//how to delete the Number in Slice Golang
a := []int{10, 20, 30, 40, 50, 60, 70, 80, 90}
var i int
fmt.Print("Enter deleted number index..: ")
fmt.Scan(&i)
a = append(a[:i], a[i+1:]...)
fmt.Println(a)
💖 💪 🙅 🚩
vinay
Posted on October 20, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024