DEV Community

Discussion on: Pub-Sub pattern: a brief explanation

Collapse
 
jucian0 profile image
Jucian0 • Edited

You are right, function will be compared base on reference, like an object.

But here I need to validate if the fn argument in the subscription and the fn argument in the unsubscription are located ate the same point of memory, if true, it means that is the same function.