Algorithm · LinkedIn · Easy
Create a function that computes the total of every number stored anywhere inside a nested array. The argument may contain arrays within arrays at any number of levels; for example, a 2D array contains arrays, while a 3D array contains arrays that themselves hold arrays. Its nesting level is not predetermined. Requirements: Add together every numeric value encountered Produce the correct result when arrays are empty Work with nesting of any depth Examples: Input: [[2, 5], [1,…