text: Function to print the list
code: function printlist ( head ) { while ( head != null ) { document . write ( head . data + " " ) ; if ( head . next != null ) { document . write ( " " ) ; } head = head . next ; } document . write ( " " ) ; }