What is the purpose of the defer keyword in Go?

1
To delay the execution of a function until the surrounding function returns.
2
To execute a function repeatedly until a specified condition is met.
3
To declare a variable that can be accessed from anywhere within the function.
4
To create a new Go routine.

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation