Keypress g shortcut. What am I doing wrong?


Hello there!
I was working on the g keypress exercise to get the like button to work.
But even after checking various posts on this site, I still can't figure out what I'm doing wrong to make the code work...

var main = function() {
  $(document).keypress(function(event) {
		if(event.which === 103) {




What am I doing wrong?


Hi @voidconscious,

Please post a link to the exercise you're on so we can help you :slight_smile:


Here's the link:

-exercise link-


Check your curly braces ({}) for the if statement - you need to close it :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.