Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
Add numbering at the end of every item of array

I am working on a project where user can input their tweet in textarea then it is broken down to various tweets based on characters length(280) i.e after every 280 length of string new tweet is created.They can also create new tweet by using "[...]" keyword. I have also added button that adds numbering to each tweet eg "I am a tweet 1/2" "I am a second tweet. 2/2". This is where i am stuck. If user types 280 word and press the numbering button it would push 1/2 numbering to another tweet.

Working process:

  1. Everytime user types: event is send to handleChange function.
  2. Input are split into array based on keyword "[...]"
  3. Every item of those array are sent to another function splitOnLength which further split those element based on length(280) and push it to tweetArray.

Problem: Add numbering to each of those items in tweetArray on button press. eg "I am a tweet 1/2" "I am a second tweet. 2/2". If user types 280 length string and press the numbering button it would push 1/2 numbering to another tweet.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!