Start with the empty list
var str = [ ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' ] ; var string = str . toString ( ) ; for ( i = 0 ; i < 7 ; i ++ ) { push ( str [ i ] ) ; printList ( head ) ; if ( isPalindrome ( head ) != false ) { document . write ( " " ) ; document . write ( " " ) ; } else { document . write ( " " ) ; document . write ( " " ) ; } }