get it on google playCreated with Sketch.
JavaScript> Assigning a value

Assigning a value

To create a new object property, we need to use the keyword this followed by a period and the property name.

class Book {
 constructor(author, title) {
  this.author
 }
}

To finish creating the new object property, we'll assign the author parameter as a value to this.author.

class Book {
 constructor(author, title) {
  this.author = author;
  this.title = title;
  }
}
TRY IT ON THE APP