Created
July 27, 2022 08:37
-
-
Save projektorius96/086921fd379f94d54ef1287c14ce5a25 to your computer and use it in GitHub Desktop.
#1 shared on linkedin
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
let obj = Object.create(null) // prototypeless object | |
/* obj.propKey = propValue; */// prototypeless also means constructorless, resulting in the term of "singleton" | |
let isInstance = new obj | |
console.log(isInstance) // TypeError: obj is not a constructor – that's what you suppose to expect | |
// === | |
// NOTE : constructorless can be prototype-based, but not vise versa with regards to example shown above ! | |
// For more read about : @https://dev.to/projektorius96/constructorless-namespaces-in-es5-es6-14pk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment