top | item 41809400

(no title)

renlo | 1 year ago

    function x() {/* ... */}
    const x = function() {/* ... */}
    const x = function foo() {/* ... */}
    const x = (function() {/* ... */}).bind(this)
    const x = (function foo() {/* ... */}).bind(this)
    const x = () => {/* ... */}
    const x = () => /* ... */

discuss

order

afiori|1 year ago

Apart from hoisting (which has little to do with functions directly) and `this` these are all equivalent