SoFunction
Updated on 2025-04-13

JavaScript writing method nine


//Define the package name
("test");

//Define the class
= function(name) {
= name;
}
= function(name){ = name;}
= function(){ return ;}


//Create an object
var p = new ("jack");

(());//jack
('tom');
(());//tom

//Test the instanceof and whether it is correctly pointed
(p instanceof );
( == );