in javascript:
d={one: false, two: true}
d.one
d.two
d.three
I want to be able to differentiate between d.one and d.three. By default they both evaluate to false, but in my case they should not be treated the same.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do
or
You probably want hasOwnProperty as the
inoperator will also return true if the property is on the an object in the prototype chain. eg.