Why is it in JavaScript that null+'' === 'null' ?
At least this is the case on Chrome 68.
It doesn't make a sense to me. Different languages handle it differently of course, but I would assume either null or '' to be a better answer.
It just makes it hard to check if something is 'null' or if it is null + ''. Which could happen in a text field for example.
This is particularly an issue with ECMAScript 6 where you can do
value={\`${value}`}
etc.
+operator does 2 things, add or concat. if one of value is not getting converted to int, it converts both values to string using internal string function. For sample you can tryString(null);This returns you"null"and hence it is equal. Hope that addresses your query