class Language {}
const l1 = new Language();
console.log(l1.constructor.name); //Language
// Works too
(1)?.constructor.name // "Number"
(false)?.constructor.name // "Boolean"
(1)?.constructor.name // "Number"
("aa")?.constructor.name // "String"
([])?.constructor.name // "Array"
({a:"a"})?.constructor.name // "Object"
(false)?.constructor.name // "Boolean"
(null)?.constructor.name // undefined
(document)?.constructor.name // "HTMLDocument"
(myImageElement)?.constructor.name // "HTMLImageElement"