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

121
Visualizações
If statments in Js

I need a litle bit of help. So I have a rename functionality, I have many if statements, the one I cant bear to begin is, I want to create an if statement when name is
is not changed, I will add an alert. Like you see from the example below for Name blank. I hope you understood me. Edit: this is if statement is for the other funcionality of rename File

   if(!fileName.replace(/\s+/, "") .length > 0){
            Alert.alert('Error', "Name can't be blank");
            return;
        } 
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

just store the previous file name and compare it with the new file name

    if (previousFileName == fileName){
        Alert.alert('Error', "Name can't be previous name");
        return;
    }
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