public/subjects/popint
MSilva95 c9790ce688 small fix 2022-07-14 10:31:14 +03:00
..
README.md small fix 2022-07-14 10:31:14 +03:00

README.md

popint

Instructions

Write a function that receives a slice of int and returns a new slice without the last element. If the slice is empty return an empty slice.

Expected function

func PopInt(ints []int) []int {

}

Usage

Here is a possible program to test your function:

package main

import "fmt"

func main() {
	fmt.Println(PopInt([]int{6, 7, 8, 9}))
}

And its output:

$ go run .
[6 7 8]