their attributes:
var name = o && o.getName();
Can anyone in short explain this with example?
If you're just dealing with normal objects, this is fine.
It's got to do with the short circuiting behavior of the logical and operator. If the first operand is falsy, it won't evaluate the second.
Обсуждают сегодня