1 + "23" - 10 = 113 1 + "23" takes as string concatenation operation. The results is "123". Then it subtract 13.
Still not that clear how following things works. [] + [] {} + {} [] + {} {} + [] +!+[]
[] + []
{} + {}
[] + {}
{} + []
+!+[]
I thought about +!+[], it could be like these (I may be wrong)
1. `+[]` is `0` 2. `!0` is `true` 3. `+true` is `1`
I think thats the solution. It's working on console.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
1 + "23" - 10 = 113
1 + "23" takes as string concatenation operation. The results is "123". Then it subtract 13.
Still not that clear how following things works.
[] + []
{} + {}
[] + {}
{} + []
+!+[]
I thought about
+!+[]
, it could be like these (I may be wrong)I think thats the solution. It's working on console.