-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: if item not in items
#3281
Comments
This is what I intuitively assumed as well. The The value is instead converted to a bool and that is compared, as if you were writing this I'd consider One thing I'll say is that when I was new to CS, I found it quite a headache plowing through code trying to find just what it was that was broken in my code. Turned out it was this, as I wrote the expression as if it were vanilla JS with some |
It almost feels like if the want |
A simple CTRL+F on http://coffeescript.org/ yields no |
|
Yeah, it just feels like the expected behaviour would be |
I suppose. But then there would be a difference between |
@renekooi sounds about right.
So yeah, I just looked up Py syntax and apparently there is also a |
Yeah, perhaps some documentation explaining this would be helpful. Showing examples of how |
Why close ? If documentation needs to be improved, let's keep it open :). |
if item not in items
* Docs: named functions and function declarations * No more prototypal `extends`; update docs and example * More comprehensive documentation of the existential operator; closes #1631 * Better document operators, including `from` * No fat arrow class methods anymore * Destructuring shouldn’t say that default values are applied in case of undefined or null * Spinoff generator and async functions into their own sections; reorder things so that the sections on functions come just before classes, and destructuring goes next to the operators (which discuss assignment) * Rewrite “CoffeeScript 2” section, making it less practical and more explanatory; move practical info into “Usage” * Update “Variable Scoping and Lexical Safety” section to remove incorrect reference to Ruby (fixes #2360), add missing details about the safety wrapper, add note about `let`/`const`. * Updated browser compiler * Updated docs * Rewrite Literate CoffeeScript breaking changes * Split apart the “Breaking Changes” and “Unsupported Features” sections into separate sidebar items and files * Add example of `not in`, closes #3281 * Fix words in bold that should be in backticks * Consolidate some breaking changes sections * Add Node API documentation; closes #3551 * Move the chaining documentation out of the changelog into its own section
Done in #4536. |
I discovered that
Doesn't work. I discovered that the syntax was
But shouldn't my original expression still work? Shouldn't the
not
still negate theitem in items
boolean result? I realize my original may not read as nicely, but both make logical sense.The text was updated successfully, but these errors were encountered: