Question

Hi, I need help with Javascript please. Question: Write a function named "tweets" that takes a...

Hi, I need help with Javascript please. Question: Write a function named "tweets" that takes a string as a parameter and returns the number of tweets required to tweet the input to the world. Note: The maximum length for a single tweet is 280 characters. Thanks!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE

function tweets(tweet_string) {

return Math.ceil(tweet_string.length / 280);

}

// TESTER CODE

tweets("Two before narrow not relied how except moment myself. Dejection assurance mrs led certainly. So gate at no only none open. Betrayed at properly it of graceful on. Dinner abroad am depart ye turned hearts as me wished. Therefore allowance too perfectly gentleman supposing man his now. Families goodness all eat out bed steepest servants. Explained the incommode sir improving northward immediate eat. Man denoting received you sex possible you. Shew park own loud son door less yet. Are sentiments apartments decisively the especially alteration. Thrown shy denote ten ladies though ask saw. Or by to he going think order event music. Incommode so intention defective at convinced. Led income months itself and houses you. After nor you leave might share court balls.");

Add a comment
Know the answer?
Add Answer to:
Hi, I need help with Javascript please. Question: Write a function named "tweets" that takes a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT