setu

Tweet Left

Sep 3rd, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Creating Variable for input the tweet.
  2. var tweet = prompt("Please insert your tweet.");
  3.  
  4. // Output for counting the tweet length and remaining characters.
  5. alert("You have written " + tweet.length + " characters. You have left " + (240-tweet.length) + (" characters."));
Advertisement
Add Comment
Please, Sign In to add comment