// Source : https://oj.leetcode.com/problems/merge-two-sorted-lists/
// Author : Dean Shi
// Date   : 2015-06-11

/**********************************************************************************
 *
 * Merge two sorted linked lists and return it as a new list. The new list should be
 * made by splicing together the nodes of the first two lists.
 *
 **********************************************************************************/

/**
 * Definition for singly-linked list.
 * function ListNode(val) {
 *     this.val = val;
 *     this.next = null;
 * }
 */
/**
 * @param {ListNode} l1
 * @param {ListNode} l2
 * @return {ListNode}
 */
var mergeTwoLists = function(l1, l2) {
    let newList = null;
    
    if (l1 === null || l2 === null) {
        return l1 || l2
    }
    
    if (l1.val < l2.val) {
        (newList = new ListNode(l1.val)).next = mergeTwoLists(l1.next, l2)
    } else {
        (newList = new ListNode(l2.val)).next = mergeTwoLists(l1, l2.next)
    }
    
    return newList
};

@@ -683,100 +683,49 @@
     
-let newList = null;%0A    %0A    if (l1 === null %7C%7C l2 === null) %7B%0A        return l1 %7C%7C l2%0A    %7D
+if (!l1) return l2%0A    if (!l2) return l1
 %0A   
@@ -745,9 +745,9 @@
 val 
-%3C
+%3E
  l2.
@@ -765,40 +765,10 @@
     
-(newList = new ListNode(l1.val))
+l2
 .nex
@@ -791,18 +791,36 @@
 s(l1
+, l2
 .next
-,
+)%0A        return
  l2
-)
 %0A   
@@ -841,40 +841,10 @@
     
-(newList = new ListNode(l2.val))
+l1
 .nex
@@ -867,30 +867,23 @@
 s(l1
-, l2
 .next
-)%0A    %7D
+, l2)
 %0A    
-%0A
     
@@ -893,15 +893,16 @@
 urn 
-newList
+l1%0A    %7D
 %0A%7D;%0A

Update MergeTwoSortedList.js