https://leetcode-cn.com/problems/swap-nodes-in-pairs/

    1. function swapPairs(head: ListNode | null): ListNode | null {
    2. if (!head || !head.next) return head;
    3. let one = head;
    4. let two = one.next;
    5. let three = two.next;
    6. two.next = one;
    7. one.next = swapPairs(three);
    8. return two;
    9. };

    https://bigfrontend.dev/zh/problem/implement-your-own-Object-create

    function myObjectCreate(proto) {
      if (proto === null || typeof proto !== 'object') {
        throw new Error('Object prototype may only be an Object or null');
      }
      function fn() {};
      fn.prototype = proto;
      return new fn()
    }