javascript class and objects code example
Example 1: javascript classes
let Person = class {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
Example 2: variables in js class
constructor(){
this.foo = bar
}