What is the difference between object method and shortened object method syntax in javascript?

前端 未结 0 1637
刺人心
刺人心 2020-12-15 03:59

I have been studying JS OOP recently, and stopped on the following line (quote):

// these objects do the same

user = {
  sayHi: function() {
    alert("         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题