Tuesday, December 6, 2016

JavaScript Operators - Q&A

Question:What will be the result of running the code below?
What will be the result if we'll drop the "b &&" from the if statement?

AnswerIn the first run the code will result in an exception stating that b is undefined.
In the second run the code will result in an alert("false"). This is because the property proA is undefined.



1 comment: