The code is meant to output the current tab object for the page the user is viewing to the console but it just outputs undefined. It\'s run from within a browser action page
Try:
chrome.tabs.getSelected(null, function(tab){ console.log(tab); });