7/9: SyntaxError: missing ; before statement


Can't find the mistake. Error messages:

  • Main error message "Oops, try again. Remember to add the line $('.btn').addClass('disabled'); outside your keyup event handler".

  • Error underneath the preview window "SyntaxError: missing ; before statement".

Checked the code with hint and all seams to be right:

var main = function (){
    $('.btn').click(function (){
        var post = $('.status-box').val();
        var postLength = $(this).val().length;
        var charactersLeft = 140 - postLength;
        if (charactersLeft <= 0) {
        else if (charactersLeft == 140) {
        else {


Please help


Hey @darthvaderkrytonite! its just a simple problem! You forgot to add the period when you added your class disabled here:

Just change that to:

And you should be fine! If your not please reply saying so!


Looks like my kind of mistake! :smile: Thanks a lot, it all good now :smile: