Function to display the circular doubly linked list
function displayList ( start ) { let temp = start ; while ( temp . next != start ) { document . write ( temp . data + " " ) ; temp = temp . next ; } document . write ( temp . data + " " ) ; }