public static class LinqExtension { public static T MaxBy<T, TR>(this IEnumerable<T> en, Func<T, TR> evaluate) where TR : IComparable<TR> { return en.Select(t => new Tuple<T, TR>(t, evaluate(t))) .Aggregate((max, next) =&g…
简化的对象写法 省略同名的属性值,省略方法的function let x = 1; let y = 2; let point = { x, y, setX (x) { this.x = x } }; console.log(point) Object.create(prototype, [descriptors]) 以指定对象(prototype)为原型创建新的对象,为新的对象指定新的属性, 并对属性进行描述(descriptors) - value : 指定值 - writable : 标识当…