4 ms·
Some of these are good. Others, such as using .bind() just to create a handler for the click() event, are terrible. Not only are you creating a NEW closure ever
by EGreg 12y ago
Some of these are good. Others, such as using .bind() just to create a handler for the click() event, are terrible. Not only are you creating a NEW closure every time the code runs (via executing .bind) but also you lose th ability to use the actual this inside the handler! Much better to use closures as they were intended, and have that extra _this var to refer to the previous context if necessary.