Javatpoint Logo
Javatpoint Logo

Go Closure

Here, we create an anonymous function which acts as a function closure. A function which has no name is called anonymous function.

A closure is a function which refers reference variable from outside its body. The function may access and assign to the referenced variables.

Go Closure Example

Output:

100
10000

Next TopicGo Array





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA