Gerardo Alberto Soto Alvarez del Castillo
-
I started with a Docstring between two slash and asterisk.
-
Then I create a class named ListNode and open a curly bracket.
-
Creating a function named constructor and between parentesis, I put two parameters separate by a comma and again open a curly bracket.
-
We define two variables with the ternary operator, if the value is undefined, we set a default value after de question mark, otherwise, we assign the value of the parameter, and close with a curly bracket and a semicolon.
-
Then I define a method called printListNode with a docstring, and this method don’t receive any parameters, I set the instance of the class in the current variable.
-
I make a loop with a while as long as the variable current isn’t null, then I print current value and update the current variable with his next value.
-
And finally, close the while loop, the printListNode method and the ListNode class, each one with a curly bracket and a semicolon.
Jesus Cuadro
Good job Gerardo