Last active
July 16, 2021 16:26
-
-
Save developernaren/00d71531f2985408e3d17ac1ab8a56bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
numberCh := make(chan int, 10) | |
for i := 1; i <=10; i++ { | |
numberCh<-i | |
} | |
for j := 1; j <=10; j++ { | |
fmt.Println(<- numberCh) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment