876. Middle of the Linked List - easy,clear, and classic solution: Javascript✔
\n\n# Code\n\n/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n *     this.val = (val===undefined ? 0 : val)\n *     this.next = (
\n\n# Code\n```\n/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n *     this.val = (val===undefined ? 0 : val)\n *     this.next = (next===undefined ? null : next)\n * }\n */\n/**\n * @param {ListNode} head\n * @return {ListNode}\n */\nvar middleNode = function(head) {\n    let slow = head;\n    let fast = head;\n    \n    while (fast && fast.next){\n        fast = fast.next.next;\n        slow = slow.next;\n    }\n    return slow;\n   \n};\n```
['Linked List', 'Two Pointers', 'JavaScript']