5

I was looking through the code of a library and found the following line:

var date = (0, _utilsParseInputJs2['default'])(props.date, format);

It is unclear to me what (0, _utilsParseInputJs2['default']) does. It seems that it is supposed to return a function, but I've never seen anything like it before. Why the (0,?

https://github.com/Adphorus/react-date-range/blob/master/lib/Calendar.js#line-73

ewooycom
  • 2,651
  • 5
  • 30
  • 52
  • 4
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Comma_Operator covers the "does". Useful is another question. – Quentin Apr 18 '16 at 11:33
  • I found this syntax being used in various "obfuscated" scripts. Whether it be paid JS scripts or some Trojan encryption scripts. – Paul Apr 18 '16 at 11:41

0 Answers0