You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
448 B

## 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
```go
func PopInt(ints []int) []int {
}
```
### Usage
Here is a possible program to test your function:
```go
package main
import "fmt"
func main() {
2 years ago
fmt.Println(PopInt([]int{6, 7, 8, 9}))
}
```
And its output:
```console
$ go run .
[6 7 8]
```