Help Me, I DON'T KNOW WHAT TO DO


#1



Exercise 5: Count characters left


It says "Uncaught SyntaxError: missing ) after argument list" and "Oops, try again. Remember to update the '.counter' to show how many characters are left."


ar main = function() {
    $('.btn').click(function() {
      var post = $('.status-box').val();
      $('<li>').text(post).prependTo('.posts');
      $('status-box').val('');
    }
  }
 });
 $('.status-box').keyup(function() {
    var postLength = $(this).val().length;
    var charactersLeft = 140 - postLength;
    $('.counter').text(charactersLeft);
  });
}


$(document).ready(main);


#2

HI in that click function you have more } than you need

    $('.btn').click(function() {
      var post = $('.status-box').val();
      $('<li>').text(post).prependTo('.posts');
      $('status-box').val('');
    }#remove this one
  }#remove this too
 });