Skip to content

Instantly share code, notes, and snippets.

@breakstorm
Created February 22, 2017 02:39
Show Gist options
  • Save breakstorm/5e9c51ffd2294edab107987be1b2e0e8 to your computer and use it in GitHub Desktop.
Save breakstorm/5e9c51ffd2294edab107987be1b2e0e8 to your computer and use it in GitHub Desktop.
/* Node is defined as
var Node = function(data) {
this.data = data;
this.next = null;
}
*/
// This is a "method-only" submission.
// You only need to complete this method.
function print(head) {
var temp = head;
//console.log(temp);
while(temp != null){
console.log(temp.data);
temp = temp.next;
}
//console.log(temp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment