FWIW, unless you have a compelling reason, avoid =...
# suitescript
t
FWIW, unless you have a compelling reason, avoid ===
🙄 1
e
I would argue the other way; use
===
except when you explicitly don't care about type conversion. In this example, you don't care about type conversion, so
==
is the right choice.
I have no earthly idea why they made
type
an Object
d
Its best practice to use
===
to avoid coercion. But yes, sorry, in this example,
type == 'view'
would be better only because
'view'
is actually an object. (THANKS NetSuite)