<script>
/**
*animal
*/
function Animal(){
='Amimal';
=function(){
alert();
};
}
/*
*cat
*/
function Cat(){
='cat';
}
var animal=new Animal;//Create animal objects
var cat=new Cat;//Create cat object
(cat,'','');//Output cat, indicating that the current this of the showName function has become cat
(cat,[]);//Output cat
//The difference between the call function and the apply function is that the syntax of call is (obj,param1,param2...); the syntax of applay is (obj,[]/*params[] parameter array*/);
</script>