Closed chicoxyzzy closed 5 years ago
This isn't a bug in eshost:
$ jsc
>>> -0
0
>>> print(-0)
0
undefined
>>>
$ sm
js> -0
-0
js> print(-0)
0
js>
$ v8
V8 version 7.5.45
d8> -0
0
d8> print(-0)
0
undefined
Oh I didn't know print
is integrated into js shells (along with read
, load
and possibly others)
In fact result should be
-0
(as it happens in all browser consoles), but-0
coerces to String somewhere. Probably this should be special-cased.