Skip to content
Quiz · Final project · lesson 2 of 7

Quiz — pop order

What does the program print?

GO
package main

import "fmt"

func main() {
    var s []int
    s = append(s, 1, 2, 3)
    a := s[len(s)-1]
    s = s[:len(s)-1]
    b := s[len(s)-1]
    fmt.Println(a, b)
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way