Hacker News new | ask | show | jobs
by renlo 611 days 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 = () => /* ... */
1 comments

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