What does "!==" Mean in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 10:26 AM - edited 01-08-2025 11:32 AM
Hello community
Bit confused with "!==" In the script. I know !== Will check both value and type.
Thanks in advance 😃
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 10:42 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2025 08:17 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 12:43 PM
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/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 01:43 PM
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."