I don't know why the methods returns always [Object object]. My code it's here:
function SetDataDB(){
alert(new DatabasePlugin.get_account_profiles('settings_account'));
}
var DatabasePlugin = {
insert_account_profiles : function(array, parameter){
window.localStorage.setItem(parameter, array);
},
get_account_profiles: function(parameter){
return "Hola";
}
};
It always returns me an object but not specified. What do I have to do?
DatabasePlugincome from?newgets you the string, as it stands its acting as a constructor so returns an object that is a new instance of get_account_profiles (which will show as [object object] if converted to a string)