Array.prototype.flat Approach
Intuition\nThis is something that can be handled using Array.prototype.flat\n\n# Approach\nI just made flat a wrapper function for Array.\n\n# Code\n\n/**\n * @
# Intuition\nThis is something that can be handled using Array.prototype.flat\n\n# Approach\nI just made flat a wrapper function for Array.\n\n# Code\n```\n/**\n * @param {Array} arr\n * @param {number} depth\n * @return {Array}\n */\nvar flat = function (arr, n) {\n    return arr.flat(n)\n};\n```
['JavaScript']