I have javascript object defined like this:
function SocialMiner()
{
var verbose=true;
var profileArray=new Array();
var tabUrl;
this.getTabUrl=function()
In the second example, you are calling logToConsole as if it is a function of the miner object, which is is not.
miner.logToConsole
Edit
Per comments about github example, this should make the logToConsole function par of the SocialMiner object. However, I didn't read the class thoroughly, so proceed with caution with regards to how it is intended to be used.
this.logToConsole=function(text)
{
if (verbose)
console.log(text);
}
It appears that logToConsole is defined somewhere globally; in any case, it is not a member of our SocialMiner class. Try this:
var pageUrl=miner.getTabUrl();
logToConsole(pageUrl);