Flatten Deeply Nested Array
\n\n# Code\njavascript []\n/**\n * @param {Array} arr\n * @param {number} depth\n * @return {Array}\n */\nvar flat = function (arr, n) {\n    if (n === 0) {\n  
\n\n# Code\n```javascript []\n/**\n * @param {Array} arr\n * @param {number} depth\n * @return {Array}\n */\nvar flat = function (arr, n) {\n    if (n === 0) {\n        return arr;\n    }\n   return arr.flat(n);\n};\n```
['JavaScript']