4 ms·
> is most likely the beginning of a chained assignment I wouldn't think so at all. I almost never do chain assignment in modern JavaScript but I write function
by ng12 9y ago
> is most likely the beginning of a chained assignment
I wouldn't think so at all. I almost never do chain assignment in modern JavaScript but I write functions which return functions somewhat often.
I guess there's a possibility that someone quickly skimming code would misread => as =. It hasn't yet happened to me though.
- masswerk 9y ago> in modern JavaScript You are probably right on this – but there's still old code around and ease of context switching may be a thing. Also, I guess, you can't be too defensive in your approaches, when setting up a shared codebase that may be around for some time. (With JS being extended on a yearly basis, we hardly can imagine what will be around a few years from now.) Edit: However, also related to modern JS, another possible counter argument to mine: With the omission of terminating semicolons and frequent use of multiline statements determining the semantics has also become a question of scanning the next line anyway. Look-ahead is now a thing.