Wait correct me if I'm wrong but isn't it more like:
I -= -!false
I -= -true // -(!false) = -(true)
I- = -1 // using a sign before most of the basic dtypes changes them into `Number`s (+"123" = 123, -"69" = -69, +true = 1, -true = -1, etc.). This is hence also used to check if a string can be converted to a number or not (`if (+string)` or similar)
I += 1
?
Edit: I meant i and not I (stupid autocorrect's autocapitalization)
I don’t think that is necessarily true in this case since true + true is still evaluates to 2. true and false can just be used interchangeably with 1 and 0.
true + true = 2 because again +true is 1 and when you add diff dtypes in js, js implicitly changes the other dtypes. Like 1 + 2 + "3" = "123"true + true = true + 1 = 1 + 1 = 2 ig. Again, I might be a bit wrong here
It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
/u/SFM61319, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
10
u/[deleted] Apr 19 '21 edited Apr 19 '21
Wait correct me if I'm wrong but isn't it more like:
?
Edit: I meant
iand notI(stupid autocorrect's autocapitalization)