I have a program written in JS. It compares output of an function with number 4. However, it seems it cannot compare properly.
var myStringNotValidated = "3T-4T";
var notValidate = myStringNotValidated.substring(3, 4);
if(notValidate === 4)
{
console.log("Value1");
}
else
{
console.log("null");
}
//OUTPUT IS NULL, WHICH IDEALLY SHOULD BE "Value1"
Can any one guide me where am I making mistake?