What is the output of prepend additive operator on falsy values

Posted by Jennifer | Updated on

If you prepend the additive(+) operator on falsy values(null, undefined, NaN, false, “”), the falsy value converts to a number value zero. Let’s display them on browser console as below:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers