Created
September 18, 2022 17:41
-
-
Save uyriq/ffe4ae6d2bc7cb673f605e19f98c5b2a to your computer and use it in GitHub Desktop.
obj or not obj?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
typeof yourVariable === 'object' && | |
!Array.isArray(yourVariable) && | |
yourVariable !== null | |
) { | |
executeSomeCode(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment