i don’t understand better the fuction
i’ve a function x
function x (str)
{
do something with str;
}
the
function y(str)
{
return str.x();
}
but the result it’s : Error x it’s not a function why?
i don’t understand better the fuction
i’ve a function x
function x (str)
{
do something with str;
}
the
function y(str)
{
return str.x();
}
but the result it’s : Error x it’s not a function why?
when you do str.x(), it is looking for a method called x that belongs to an object str
I believe what you want to do is x(str) instead. x is a function, and str is the parameter you pass to the function.
perfect, now it’s all ok, thanks for the answer