javascript: why to "sign-prefix" a variable?

Posted by harald on Stack Overflow See other posts from Stack Overflow or by harald
Published on 2010-05-21T09:26:17Z Indexed on 2010/05/21 9:30 UTC
Read the original article Hit count: 379

Filed under:
|

hello,

i'm currently looking at a little 3rd-party javascript library and i see a lot of "sign-prefixed" variables in it:

function_call(+value);

i know, that you can swap the sign, if you prefix a variable with '-', but why to prefix something with a '+' -- it doesn't do anything to the value, no?

thanks in advance!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about syntax