When to use 'return' inside a method in Javascript

前端 未结 0 1421
庸人自扰
庸人自扰 2020-12-28 08:47
let calculator = {
  sum() {
    return this.a + this.b;
  },

  mul() {
    return this.a * this.b;
  },

  read() {
    this.a = +prompt(\'a?\', 0);
    this.b = +         


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