当前位置 : 主页 > 大数据 > 区块链 >

Array Updates in ECMA

来源:互联网 收集:自由互联 发布时间:2021-06-22
I came across the comments committed before, improvingrecursion function with "array.reverse().reduce()". The bro replied with "array.reduceRight()". OMG, so embarrassed. I didn't notice such method, which has been added in ES5, until he me

I came across the comments committed before, improving recursion function with "array.reverse().reduce()".  The bro replied with "array.reduceRight()". OMG, so embarrassed. I didn't notice such method, which has been added in ES5, until he mentioned.

Handling data in array format is so common in both JavaScript and TypeScript. And I find that it really improves a lot when using these prototype methods of Array. Just for records, I will keep updating the series.

Firstly, please check the Specifications for the updates in per version(ECMA 1st version, ES5, ES6(ES 2015), ES7(ES 2016)) and Browser compatibility.


References:

1. Array in MDN web doc: 点击打开链接

网友评论