Forum Discussion

Philip_Baird's avatar
Philip_Baird
Community Expert
13 years ago

Test Complete, JScript equality and the "evil twins"

I have a question around the JScript equality operators in regards to Test Complete,

ie === and !== vs their "evil twins" == and !=



From a web developer background, our standard was to NEVER use == or != due to type coersion to avoid unexpected results such as:




'' == '0'           // false


0 == ''             // true


0 == '0'            // true



When it comes to Test Complete, should the same consideration be given?

1 Reply

  • I beleive in TestComplete scripts this question is not so hot. I think you should continue to code as you used to.