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

153
Vistas
How Do I Clear My DOM where the emoji is placed to make way for the new set of Array coming to the DOM

working on an emoji app where users can put in an emoji in an input and add to the end of my current emoji sitting in the DOM .

Once my emoji has been pushed into the array of the hardcoded emoji's, the current emoji on display is meant to be cleared to make way for rendering the new arrays in being sent over.

This is where I am stocked.

Here is my code

let emojiIcons = document.getElementById("emoji-disp-cont")
let emoji = ["👨🏾‍💻", " 🐄", " 💽"]

function render() {
  for (let i = 0; i < emoji.length; i += 1) {
    emojiIcons.textContent += emoji[i]
  }
}
render()
let addfrbtn = document.getElementById("addfr-btn")
addfrbtn.addEventListener("click", function() {
  let inputbox = document.getElementById("input-box")
  if (inputbox.value) {
    emoji.push(inputbox.value)
    inputbox.value = ""
    emojiIcons.textContent = ""
    render()
    console.log(emoji)
  }
})
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