js array.at All In One
js array.at All In One
const arr = [1, 3, 5];
const index = 2;
console.log('arr[index] =', arr[index]);
// arr[index] = 5
console.log('arr.at(index) =', arr.at(index));
// arr.at(index) = 5
Array.at
https://caniuse.com/?search=Array.at
https://caniuse.com/mdn-javascript_builtins_array_at
refs
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at
?xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有??xgqfrms, 禁止转载 ???,侵权必究??!