Created
December 4, 2019 11:41
-
-
Save JamieDixon/a90ebb4b65e995d0079fa56b56a31a00 to your computer and use it in GitHub Desktop.
Revisions
-
JamieDixon created this gist
Dec 4, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ const hasAnyOwnProp = o => { for(let p in o) { return true; } return false } const a = hasAnyOwnProp({ bob: 'bob', sam: 'sam' }); const b = hasAnyOwnProp({}); console.log('a', a); // true console.log('b', b); // false