Answers for "Classes and constructor functions in ES6"

0

Classes and constructor functions in ES6

class Func {
  constructor(a, b) {
    this.a = a
    this.b = b
  }

  getSum() {
    return this.a + this.b
  }
}

let x = new Func(3, 4)
Posted by: Guest on April-10-2022

Code answers related to "Classes and constructor functions in ES6"

Code answers related to "Javascript"

Browse Popular Code Answers by Language