โš–๏ธcallable vs. constructable

function
F()
new F()
note

Array, Error, Function

โœ…

โœ…

same effect

Boolean, String, Number

primitive

wrapper object

Date

string

object

Symbol, BigInt

โœ…

โ›”๏ธ TypeError

Proxy, Map

โ›”๏ธ TypeError

โœ…

class

โ›”๏ธ TypeError

โœ…

Last updated

Was this helpful?