- 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);
推薦閱讀
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- INSTANT Mock Testing with PowerMock
- Spring 5企業(yè)級(jí)開(kāi)發(fā)實(shí)戰(zhàn)
- Python爬蟲(chóng)開(kāi)發(fā):從入門(mén)到實(shí)戰(zhàn)(微課版)
- Windows系統(tǒng)管理與服務(wù)配置
- 實(shí)用防銹油配方與制備200例
- HTML5+CSS3網(wǎng)站設(shè)計(jì)教程
- Learning ArcGIS Pro
- Web全棧工程師的自我修養(yǎng)
- Python漫游數(shù)學(xué)王國(guó):高等數(shù)學(xué)、線(xiàn)性代數(shù)、數(shù)理統(tǒng)計(jì)及運(yùn)籌學(xué)
- JavaScript:Moving to ES2015
- 表哥的Access入門(mén):以Excel視角快速學(xué)習(xí)數(shù)據(jù)庫(kù)開(kāi)發(fā)(第2版)
- PHP 7+MySQL 8動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)從入門(mén)到精通(視頻教學(xué)版)
- Tableau 10 Bootcamp
- Mastering Apache Storm