0

So to access objects value we write objectname.method() but how does toUpperCase or other similar methods works in js we are not passing any argument nor do we know the name of the object then how does it function?

//For ex

let var1 = "hello"

let var2 = var1.toUpperCase();

// Does it make var1 an object and if it does where does toUpperCase method came from?

0 Answers0