0
function hello() {

    let list = {
        firstName: "Jack"
    }

    return "Hello " + this.firstName;
}

console.log(hello());

How does the keyword "this" work? I cant get my head around it. How should I use it and how should I think? Is there any simple sentence you can associate "this" so its easier to understand?

M0nst3R
  • 5,186
  • 1
  • 23
  • 36
yunolol
  • 1
  • 1

0 Answers0