For this Question: You have to complete a function that takes two parameters 
<b> First parameter:</b> an array which contains sub array in it at multi level 
<b>Second parameter: </b>an integer [depth] 
Now your task is to return a new array that have its sub array concatenated into it upto the given specified depth given in the parameter.

Note:- Ignore "Generate Expected Output" for this one, since its not a DSA question the function  <code>findTheString(array, depth)</code> take two parameters 
<b> First Parameter: </b> array which contains sub arrays 
<b> Second parameter: </b> <code>depth</code> which is an integer specifying till which depth we want to concatenate sub array elementsthe output will be an array with all sub array elements concatenated into it recursively up to the specified depthconst array=[2,[3,[4]]]
let depth=1
const answer= findTheString(array,depth) //returns an array with 1 nested subarray concatenated
console.log(answer) //[2,3,[4]]

depth = 2
const answer2 = findTheString(array,depth) // returns an array with 2 nested array concatenated
console.log(answer2) // [2,3,4], I have written this Solution Code: 
function findTheString(array,depth) {
    
    let flatArray = array.flat(depth); 
    return flatArray;
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?