I am not sure whats wrong with this code, it seems that whatever is in the button function does not work.
var arcadeButton = $("#Arcade");
var ininiteButton = $("#Infinite");
var helpAndAboutButton = $("#HelpAndAbout");
var num;
var hideAllTheButtons = function() {
arcadeButton.hide();
infiniteButton.hide();
helpAndAboutButton.hide();
};
arcadeButton.click(hideAllTheButtons);
infiniteButton.click(hideAllTheButtons);
helpAndAboutButton.click(hideAllTheButtons);
arcadeButton.click(function(){
num = 11;
});
console.log(num);
whenever I run this, the console just prints "undefined" even if I repeatedly click the button. Could it be a problem with my game logic?






