> ~3
-4
> ~4
-5
> ~0
-1
> ~-1
0
> ~0
-1
>~'str'
-1
So for numbers, it's basically +1 and multiply (-1), for strings, it just returns (-1), what does it really doing here? Is there a name for '~'?
> ~3
-4
> ~4
-5
> ~0
-1
> ~-1
0
> ~0
-1
>~'str'
-1
So for numbers, it's basically +1 and multiply (-1), for strings, it just returns (-1), what does it really doing here? Is there a name for '~'?