While writing simple snippet for comparison in JavaScript I observed some weird behavior.
Case 1:
typeof(window.WHTStatement.DDL_TPTypeID.size()) ==> "number"
typeof(window.WHTStatement.Txt_TPTypeValue.size()) ==> "number"
window.WHTStatement.DDL_TPTypeID.size() == 1 == window.WHTStatement.Txt_TPTypeValue.size()
returns true -- OK
Case 2:
window.WHTStatement.DDL_TPTypeID.size() === 1 == window.WHTStatement.Txt_TPTypeValue.size()
returns true -- OK
Case 3:
window.WHTStatement.DDL_TPTypeID.size() === 1 === window.WHTStatement.Txt_TPTypeValue.size()
returns false, why?
What exactly happening here in case 3. Can somebody elaborate?