5. Count characters left


I keep getting this error:
Oops, try again. Remember to update the '.counter' to show how many characters are left.

Can you help me out? This is my code:

var main = function() {
$('.btn').click(function() {
var post = $('.status-box').val();

  • ').text(post).prependTo('.posts');
    $('.status-box).val(' ');

    $('.status-box').keyup(function() {
    var postLength = $(this).val().length;
    var charactersLeft = 140 - postlength;


  • #2


    Look here

    It's postLength not postlenght


    Thanks a lot, but I still get the same error.


    I think the code works fine but you will need to create a new li attribute to a append the new message to in this line: