Difference between reference and instance in javascript

后端 未结 8 2085
长情又很酷
长情又很酷 2020-12-23 23:10

Sometimes I hear people say \"a reference to a object\" and some say \"a instance of a object\" What is the difference?

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 23:36

    Var a="myObject";
    var b=a;
    

    Here, variable a is an Instance and variable b is a Reference

提交回复
热议问题