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(); // 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1e4de-333fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1e4de-333fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?