ESNext 博文

相对索引 `at` 方法

JavaScript 中数组、类数组以及字符串方法的新方法 at 除了可以根据索引属性访问元素外,还能够使用负数相对索引 Array.at(-1) 和 String.at(-1)。

1 页,共 2