I am checking out ES6 features and the Symbol
type created a question for me.
With ES6 we cannot apply the new
operator on Symbol()
. When we do it, it throws an error. And it does this checking if the function is being used as constructor. So, how it does check if the function is being used as constructor or not behind the scenes? (Implementation might change depending on the platform.)
Could you share any example implementation?