6 Matching Annotations
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
emphasizing that 'this' and 'global object' are two different things not only in Node.js but in JavaScript in general
-
-
github.com github.com
-
There is no rerender, when you call listen, then all scroll events will warn on chrome. See this entry from svelte: breaking the web
Even the author of this library forgot this about Svelte?? :) (Or maybe he didn't and this response misunderstood/falsely assumed that he had.)
-
-
stackoverflow.com stackoverflow.com
-
Never use x && y || z when y can return a non-zero exit status.
-
-
unix.stackexchange.com unix.stackexchange.com
-
I think what the author intended to do was check if the second argument was a non-empty string (which is not the same thing as checking whether there are more than 1 argument, as the second argument could be passed but be the empty string).
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
However, this construct is not completely equivalent to if ... fi in the general case.
The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.
-
Some people try to use && and || as a shortcut syntax for if ... then ... else ... fi, perhaps because they think they are being clever.
-