KB
Size: a a a
KB
KB
KB
KK
Д
{
const arr = ['a', 'b', 'c', 'd', 'e'];
console.log(arr.at(arr.indexOf('d'))); // 'd'
{
const arr = ['a', 'b', 'c', 'd', 'e'];
console.log(arr.at(-1)); //'e'
S
IS
АГ
АГ
АГ
АГ
S
IS
S
c
{
{
const arr1 = [['a'], 'b', 'c'];
const shallowCopy = [...arr1]
const stringifyed = JSON.parse(JSON.stringify(arr1))
arr1[0].push(1)
console.log(shallowCopy); // [['a', 1], 'b', 'c']
console.log(stringifyed); // [['a'], 'b', 'c']