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

225
Vistas
How to push text value into array

I am looking for a JavaScript push method to add value into array, in the style of:

title = document.getElementById('tit').value;
description = document.getElementById('desc').value;
if (localStorage.getItem('itemJson') == null) {
    itemJsonArray = [];
    itemJsonArray.push([title, description]);
    localStorage.setItem('itemJson', JSON.stringify(itemJsonArray));
}
about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Just Use The Following Code To Add A Text To An Array Using Something Like This:

title = "First Element"
itemJsonArray = [];
itemJsonArray.push(title);
about 4 years ago · Santiago Trujillo Denunciar

0

You can push multiple elements to the javascript array by using the below steps.

const arr = [];

arr.push('title', 'description');
console.log(arr); // 👉️ ['title', 'description']

about 4 years ago · Santiago Trujillo Denunciar
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