James Fulford
Mar 31, 2021

--

w.r.t. Promise.finally, only reason is not knowing. Good tip.

Yes, if line 42 is triggered, it looks like it would not do anything. Though I suppose if you had a more complicated case than a countdown, your logic may vary and this would serve as a useful prompt to account for that case. As funny as it sounds, I'm leaving it there because it serves a non-functional purpose.

As for line 4, you are right, it could just be undefined. I think at the time I wasn't sure if the callback provided to`new Promise` would invoke immediately. I suppose the only way this would vary is if there wasn't a `new Promise`, but that's essential to this recipe. I think you got me there.

--

--

James Fulford
James Fulford

No responses yet