function flattenTiles(){
        let newArray = []

        tilesData.forEach(value => {
            newArray = [...newArray, ...value]
        })
        return newArray
    }
// I know tiles is a 2d-array so I can just flatten it.
I know tiles is a 2d-array so I can just flatten it.
I know tiles is a 2d - array so I can just flatten it .
function flattenTiles(){
        let newArray = []
        tilesData.forEach(value => {
            newArray = [...newArray, ...value]
        })
        return newArray
    }
function flattenTiles ( ) { let newArray = [ ] tilesData . forEach ( value => { newArray = [ ... newArray , ... value ] } ) return newArray }
I know tiles is a 2d-array so I can just flatten it.
I know tiles is a 2d - array so I can just flatten it .