什么是javascript面向对象编程

2025-05-20 03:45:10
推荐回答(2个)
回答1:

面向对象是oop思想,javascript里没有面向对象只有面向过程

回答2:

var Student1=new Object();
Student.stuno = 1024;
Student.age = 20;
Student.getName= function(){
   return this.name;
};

var Student2 = {
   name : 'hello js',
   age : 24,
   getname : function(){
       return this.name
    }
}