0

is there any way to configure Javascript to output 'NaN' + number = number (i.e) 'NaN'+32=32

  • why not make `NaN` to 0 and achieve it? – Nidhin Joseph Jul 23 '19 at 23:12
  • 2
    This seems very much like a typical [XY](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) problem; what problem are you trying to solve that led to this question? – David Thomas Jul 23 '19 at 23:12
  • 2
    If you want the code to behave differently normally it takes rewriting the code itself, not configuring the interpreter. If Javascript starts to handle NaN differently then other js code might not work anymore. – Gherman Jul 23 '19 at 23:15
  • If your code is rendering NaN, I would solve the issue at it's origin rather than modify it in calculation. I assume you are expecting an int. – Adrianopolis Jul 23 '19 at 23:38

0 Answers0