3 ms·
In the closure example does declaring a new variable and setting its value to the iterative or the thing being passed in, does that mitigate the pass by referen
by gigatexal 4y ago
In the closure example does declaring a new variable and setting its value to the iterative or the thing being passed in, does that mitigate the pass by reference issue?
- yencabulator 4y agoYes. for i := 0; i < 10; i++ { i := i ... } https://go.dev/play/p/P7TunJCL7RS https://go.dev/play/p/P7TunJCL7RS
- gigatexal 4y agoThank you! The example is brilliant. Thanks.