Disable Button 1 : Make sure you have defined all the variables!


var main=function(){
        var post;
        var postLength = $(this).val().length;
        var charactersLeft = 140-postLength;
        else if(charctersLeft== 140)


I get the error Make sure you have defined all the variables!.Please help me locate my mistake.
Thank you


Hi Rahul,

Your code isn't currently fully visible. Please see Using backticks to format your code, then edit your post to fix it, and leave a reply to this so I'll get a notification :slightly_smiling:


Sorry about that , edited it now


charactersLeft is misspelled in your else if condition.


omg ,thank u so much :stuck_out_tongue: