Why can Symbol be called as a function but not a constructor in js?

I know you can Symbol (), but you can"t new Symbol (), but how do you do that?

or can I write a function that can only be called simply, without new, and report an error as soon as I add new

Jul.13,2022

function Foo() {
    if (this instanceof Foo) {        
       throw new Error("new is not permitted.");
    }
}
new Foo();

Arrow function is


it is hard to say how it is implemented internally. It can also be achieved with pure js:

function Foo() {
    if (this !== window) { // nodewindowglobal
        throw new Error("new is not permitted.");
    }
    ...
}
new Foo(); // 
Menu