Created
February 22, 2017 02:39
-
-
Save breakstorm/5e9c51ffd2294edab107987be1b2e0e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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