Multiple ChoiceIntermediate 30s
in vs hasOwnProperty
Choose the best answer for: property existence checking
Options
- 1'prop' in obj checks prototype chain; hasOwnProperty does not
- 2'prop' in obj returns the value of the property or undefined
- 3'prop' in obj and hasOwnProperty are identical in behavior
- 4'prop' in obj only checks own properties, not the prototype
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.