Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

164
Visualizações
( if steatmetn), even if the value is null when I click the button it delete the items

in the if statement, even if the value is null, when I click the button, it is still deleting the item which is in the array. I would be happy if you guys help, I have no idea.

[1]:

here is the picture https://i.stack.imgur.com/0Pm5K.png

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In first screenshot - you need to remove comparison with null, I mean next:

if(dele){
   ....
} else {
   alert('Put a value');
}

Solution for the second screenshot:

function myfc2() {
  let change = document.getElementById("den").value;

  if(change){
    liste[change] = document.getElementById("sen").value;
  } else {
    alert("Put a value");
  }

  document.getElementById("demo").innerHTML = liste;
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda