2D JavaScript配列を1D配列に変換して、2D配列の各要素が1つの1D配列に連結されるようにします。
arrToConvert
ここでは、1D配列に変換しようとしています。
var arrToConvert = [[0,0,1],[2,3,3],[4,4,5]];
console.log(get1DArray(arrToConvert)); //print the converted array
function get1DArray(2dArr){
//concatenate each element of the input into a 1D array, and return the output
//what would be the best way to implement this function?
}