Help Me! Error: Make sure you have defined all the variables!


#1



https://www.codecademy.com/en/courses/web-beginner-en-hk5qh/0/5?content_from=make-an-interactive-website%3Ajquery-dom-manipulation#


Plz help me this the error message i get on part 5/9 in Interactive Website: Status Update -

Oops, try again. Make sure you have defined all the variables!


var 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().lenght;
        var charactersLeft = 140 - postLenght;
        $('.counter').text(charactersLeft);
        
    });
}

$(document).ready(main);


#2

Hi @gavinddwyer,

Check your spelling of length :slight_smile: