I read somewhere that in JS function (not the function), the scope of this
keyword depends on the parent object calling it.
So I did something as simple as declaring a variable name in my Global Scope and calling it inside a function using this keyword
let name = "rohit"
function something () {
console.log("this scope", this.name)
}
something()
This didn't logged anything for this.name
Question: Can someone help me understand that why does it not log anything and not even return an error?