5 ms·
I'm suspicious of the code presented in the title. - It looks like JavaScript, so the explicit weak comparison against a boolean is unnecessary - I believe an
by yakshaving_jgt 5y ago
I'm suspicious of the code presented in the title.
- It looks like JavaScript, so the explicit weak comparison against a boolean is unnecessary
- I believe and& will be a parse error
- I don't think you'll want to assign a value to the age variable in the condition
- ape4 5y agoGood points, and I would make it a member function `hasChildren() { ... }`
- vidarh 5y agoThe "and&" is "&&" in the linked article, and the "=age" is ">=age" in the linked article. But it's not real code, so making assumptions about the semantic is pointless.
- GuB-42 5y agoActually, it is "&& age >= 30", I guess there is some HTML messup somewhere.