My code doesn't work on exercise 5


Mine still didn't work. This is my code:

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

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

5. Count characters left

Hi Rachelrocks2007,

That code looks suspiciously similar to something copy/pasted from the forum - I strongly recommend against doing that, because then you'll have much less of an understanding of what the code is actually doing.

That needs to be $('<li>') instead.


I tried but it didn't work.


@rachelrocks2007 Well in that case, post your new code so I can find the problem(s) in it.

I'm not a magic genie - I need to see your code to help you, and I need you to format it properly so I can see it: