It’s binary inversion. ~n = -(n + 1)
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
Prosper Otemuyiwa -
Gonzalo Fernández -
Ankit Yadav -
juan jose orjuela -
Once suspended, ytskk will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, ytskk will be able to comment and publish posts again.
Once unpublished, all posts by ytskk will become hidden and only accessible to themselves.
If ytskk is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Andrey.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag ytskk:
Unflagging ytskk will restore default visibility to their posts.
Top comments (1)
There is a nice trick of turning
indexOfresults into booleans involving this method.Take the following code:
Can be turned into:
Since
-1will turn to 0 it will be resolved asfalsewhen doing a naive bool comparison, and other numbers (0 and up) will change into numbers which will be consideredtrue.I personally prefer to have things more readable, and also there are standard methods that aim to remove the need for these types of checked (
includesfor example), so I don't use it at all. But it's a nice thing to think about :)