- Hands-On Functional Programming with TypeScript
- Remo H. Jansen
- 107字
- 2021-07-02 14:03:11
Lambda expressions
Lambda expressions are just expressions that can be used to declare anonymous functions (functions without a name). Before the ES6 specification, the only way to assign a function as a value to a variable was to use a function expression:
const log = function(arg: any) { console.log(arg); };
The ES6 specification introduced the arrow function syntax:
const log = (arg: any) => console.log(arg);
推薦閱讀
- Microsoft Exchange Server PowerShell Cookbook(Third Edition)
- Visual Basic程序開發(學習筆記)
- Learn WebAssembly
- Easy Web Development with WaveMaker
- 人人都是網站分析師:從分析師的視角理解網站和解讀數據
- Python機器學習經典實例
- Apache Kafka Quick Start Guide
- Rust游戲開發實戰
- Getting Started with Python
- Natural Language Processing with Python Quick Start Guide
- Angular Design Patterns
- 你真的會寫代碼嗎
- IBM RUP參考與認證指南
- 可視化H5頁面設計與制作:Mugeda標準教程
- Microsoft XNA 4.0 Game Development Cookbook