Find the required periodic string with period 2
else { let arr = new Array ( l ) ; for ( let i = 0 ; i < l ; i += 2 ) { arr [ i ] = ' ' ; arr [ i + 1 ] = ' ' ; } for ( let i = 0 ; i < l ; i ++ ) document . write ( arr [ i ] ) ; document . write ( " " ) ; } }