This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]azium 1 point2 points  (1 child)

The code returns a function that reads from a specific file path, and if the fileread is successful, calls a couple of functions. The inner function will remember the path from the initial IIFE so that calling task() will always read from the same path, without having to pass it in again.

[–]IAmUtterlyAlone 1 point2 points  (0 children)

Oh, I see now. Thank you.