I would like to clarify this doubt, but there may be solutions I don't know, so please help me. Generally while writing code we call a function
function call(a){
/*some task*/
}
as
var a = "HELLO";
var data = call(a);
so the passing value will be processed inside the function call()
and return some value to data
.
But in the case of calling some builtin JavaScript functions like toString()
, toLowerCase()
, we won't pass the value inside the function rather we call the function like a.toLowercase()
.
How does this type of function call work behind the scenes, and is there any way to call the custom functions like the way the builtin functions are being called? Thanks in advance.