TypeScript笔记三
/** * Created by ufo9631 on 2017/5/17. */ //箭头表达式 消除javascrpt 带来的this问题 var sum = function (arg1, arg2) { return arg1 + arg2; }; //箭头表达式,声明匿名函数 var sum1 = function (arg1, arg2) { return arg1 + arg2; //多行的话得写大括号和return }; var sum3 = function () { }; //无参 var sum4 = function (arr1) { console.log(arr1); }; var myArr = [1, 2, 3, 4, 5]; console.log(myArr.filter(function (value) { return value % 2 == 0; })); //# sourceMappingURL=ts4.js.map