Javascript Empty Array Element Restructuring Interview