Hướng dẫn thử thách
1 / 172
Anonymous Functions
### Giai đoạn: Nền Tảng & Khái Niệm Cốt Lõi
**Anonymous Functions**
Functions declared without names, also called function literals or lambdas. Can be assigned to variables, passed as arguments, or executed immediately. Useful for short operations, callbacks, goroutines, and closures. Access enclosing scope variables. Common in event handlers and functional patterns.
### Khái niệm cốt lõi:
1. **Functions declared without names, also called function literals or lambdas**
2. **Can be assigned to variables, passed as arguments, or executed immediately**
3. **Useful for short operations, callbacks, goroutines, and closures**
### Tài liệu tham khảo chính thống:
- [Anonymous Functions](https://golangdocs.com/anonymous-functions-in-golang) (article)
- [Understanding Anonymous Functions in Go: A Practical Guide](https://dev.to/abstractmusa/understanding-anonymous-functions-in-go-a-practical-guide-57hd) (article)
Nhiệm vụ của bạn
Viết giải pháp của bạn cho bài học **Anonymous Functions** vào trình soạn thảo bên cạnh. Bấm **Chạy Thử Nghiệm** (hoặc nhấn `Ctrl+Enter`) để thực thi và ghi nhận hoàn thành kỹ năng trên Roadmap.
### Kỹ năng cần đạt:
- `Anonymous`
- `Functions`
- `Engineering`
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.go
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵