var tweet = prompt("type your tweet here:");
var tweetcount = tweet.lenght
alert("you have writed " + tweetcount + " character, " + "you have " (180 - tweetcount) + "character");
I'm trying to learn how character count work.
as @ivar and @andy mentioned above You are missing a + between "you have " and (180 - tweetcount) and .lenght should be .length
var tweet = prompt("type your tweet here:");
var tweetcount = tweet.length
alert("you have writed " + tweetcount + " character, " + "you have " + (180 - tweetcount) + " character");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments