Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aktenlage
· 1mo ago · 0 comments
What's the purpose of the +x at the end?
Comments
[–]
undecidabot
1mo ago
The unary plus implicitly converts an expression to a number, which calls `valueOf` for non-primitive values.
[–]
aktenlage
OP
1mo ago
Thank you
[–]
emaro
1mo ago
I think to implicitly trigger the valueOf function.
[–]
aktenlage
OP
1mo ago
Thank you