Ad
  • Custom User Avatar

    In javascript this refers to the object you call a function on. But since a function is also an object in javascript you can do this().

    Here this refers to the function you call pipe on, so you call the original function with the arguments and pass the result to the piped function as an argument so addOne.pipe(square)(1) is actually square(addOne(1)) where this refers to addOne

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution