lundi 22 novembre 2021

If statments in Js [closed]

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;
        } 

Aucun commentaire:

Enregistrer un commentaire