Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
const myApp = {
  title : 'guest',
  setTitle(title) {
    this.title = title;
    return this;
  },
  printTitle() {
    console.log(`My title is ${this.title}`);
  }

}

const child = myApp.setTitle('hubla').printTitle();
node v10.16.0