move the head to povar to the new node
head_ref = new_node ; head = head_ref ; } function reverseList ( head_ref ) { var current , prev , next ; current = head_ref ; prev = null ; while ( current != null ) { next = current . next ; current . next = prev ; prev = current ; current = next ; } head_ref = prev ; head = head_ref ; }