@maxinimize/

this-exe-3

JavaScript

No description

fork
loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const character = {
  name: 'Simon',
  getCharacter() {
    return this.name;
  }
};

// const giveMeTheCharacterNOW = character.getCharacter; // without binding 'this' to object it returns undeifiend

const giveMeTheCharacterNOW = character.getCharacter.bind(character);


console.log('?', giveMeTheCharacterNOW());
Native Browser JavaScript