Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda