Lets say I have a string.
const myStr = "-0";
I want to check the sign of this numeric string. I am doing in this way
Math.sign(Number(myStr)) === -1 || Math.sign(Number(myStr)) === -0
But the number function is converting -0 as 0 because of that Math.sign(Number(myStr)) === -0 is giving false. I want to why Number() is behaving like this and is there any way so that the sign of numeric string can be preserved after the converting to number.