7/9 Disable the button 1 problem


I've endlessly been staring at my code and still don't know what is wrong. I receive the message: "Oops, try again. Remember to remove the class "disabled" from the Post button after the user starts typing." Anybody could help me with this? Here 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;
        if(charactersLeft < 0) {
        else if(charactersLeft = 140) {
        else {


Hi Galazka23,

In JavaScript, one equal sign (=) sets a variable equal to a value. Two or three equal signs compare the variable's value to your comparison value.

So this line:

Actually needs to look like this:

                       // ↓ third `=` can go here if you want
else if (charactersLeft == 140) {


Many thnaks for the explanation! It works!


2 posts were split to a new topic: What is the correct syntax for 7/9?


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.