Three-dimensional array in JavaScript

Here is an example of a 3D array:

javascriptlet arr = [
  [
    ['a', 'b'],
    ['c', 'd'],
  ],
  [
    ['e', 'f'],
    ['g', 'h'],
  ],
  [
    ['i', 'j'],
    ['k', 'l'],
  ],
];

To display elements from such an array, you already need to write three square brackets pairs:

javascriptconsole.log(arr[0][0][0]); // shows 'a'
console.log(arr[2][1][0]); // shows 'k'
Задание 1

Given the following array:

javascriptlet arr = [
  [
    [1, 2],
    [3, 4],
  ],
  [
    [5, 6],
    [7, 8],
  ],
];

Referring to each element of the array, find the sum of all its elements.