2 ms·
>Calling send() with no arguments is functionally the same as calling .next(), but last I heard it would throw an error. I just tried one in Firefox 17, and yo
by cynwoody 14y ago
>Calling send() with no arguments is functionally the same as calling .next(), but last I heard it would throw an error.
I just tried one in Firefox 17, and you can prime it by calling send() with no argument. It objects if there is an argument on the initial send().
- deleted 14y ago[deleted]
- kilovoltaire 14y agoYeah this is a nice advantage of Javascript over Python: send() is equivalent to send(undefined) which is equivalent to next(). This equivalence is true in Python as well, but you have to explicitly call send(None) which is annoying.
- thejsjunky 14y agoAh, yes you're right.