Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 390 Bytes

no-typeof-undefined.md

File metadata and controls

13 lines (8 loc) · 390 Bytes

Pattern: Use of typeof x === 'undefined'

Issue: -

Description

Do not use the idiom typeof x === 'undefined'. You can safely use the simpler x === undefined or perhaps x == null if you want to check for either null or undefined.

Further Reading