What does "!==" Mean in script

anvitha ash
Tera Contributor

Hello community 

 

Bit confused with "!==" In the script. I know !== Will check both value and type.

 

 

 

 Thanks in advance 😃

5 REPLIES 5

Juhi Poddar
Kilo Patron

Hello @anvitha ash 

It checks whether the result from stockRuleGr.pending_delivery.toString() is not equal to the string value 'true'.

This means that if the pending_delivery field is null, undefined, false, or any value other than true/'true', the condition will evaluate as true.

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar

Hello @anvitha ash 

I hope you are doing well.

If your query is answered, please hit like and mark it as an accepted solution.

This helps future readers to locate the solution easily in community.

 

Thank You 

Juhi Poddar 

AndersBGS
Tera Patron
Tera Patron

Hi @anvitha ash ,

 

The !== operator compares operands and returns true if both operands are of different data types or are of the same data type but have different values.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Mimi Edet
Tera Guru

HI @anvitha ash 

 

The strict inequality (!==) operator checks whether its two operands are not equal, returning a Boolean result.

 

 

5 != '5';  // false, because after type coercion, both are treated as 5 (number)
5 !== '5'; // true, because the types are different (number vs string)

 

 

Regards,

Mimi Edet

LinkedIn: https://www.linkedin.com/in/edet-promise/

========================================================= 
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."