Can't pass the n shortcut 2


Hi. I can’t seem to pass this. can anyone help?

var main = function() {
  $('.article').click(function() {
  $(document).keypress(function(event) {

 if ( event.which === 111 ) {
     else if ( event.which === 110 ) {
       var currentArticle = $('.current');
       var nextArticle =;


Hi Nurulhusna97,

It looks to me like you’re not calling the main() function. Try adding


at the end of app.js, and I think your code will work. If not, please reply & I’ll take another look at it :slight_smile:


Mine looks exactly the same too but I can’t seem to pass either. I don’t understand. It looks exactly the same as the hint. Did you manage to pas in the end?


I realised that right after I posted the code and it worked. Thanks though ^^


A post was split to a new topic: Getting the error message “SyntaxError: Parse Error” on The N Shortcut 2