Last active
October 10, 2017 18:38
-
-
Save kanikash4/eacc7652c72d103af49a5ec35b5c98c4 to your computer and use it in GitHub Desktop.
Revisions
-
kanikash4 revised this gist
Oct 10, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,4 +21,4 @@ function reverse(list) { } } reverse(list); -
kanikash4 created this gist
Oct 9, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ var list = { name : 'I', next : { name : 'AM', next : { name : 'KANIKA', next : { name : 'SHARMA' } } } }; function reverse(list) { if(list.next) { reverse(list.next); console.log(list.name); } else { console.log(list.name); } } reverse(list);