I am using objects in JavaScript and try to call a function in a object with a parameter like:
obj.func(parameter);
The function is yet simple and just log the parameter in the console, or should do it.
func: function (txt) {
console.log(txt);
}
The console just returns
undefined
which means, as far i know, there is no parameter given.
Can anyone help me?
parameterisundefined.parameterset? If you never set the value, you're passingundefinedinto the function.undefinedor not passing any parametersundefined.