reymesson1 / Programacion-Web-Avanzada-Most-Wanted

1 stars 0 forks source link

Algorith #20

Open reymesson1 opened 4 years ago

reymesson1 commented 4 years ago

description = this.state.orderAPI[0].description

        for(var i=0;i<description.length;i++){

            for(var j=0;j<ABC.length;j++){

                if(description[i]==ABC[j]){

                    str+=ABC[j]                      
                    count++                        
                }
            }

            if(count==4){
                break;
            }

        }

        count = 0

        for(var i=0;i<description.length;i++){

            for(var j=0;j<num.length;j++){

                if(description[i]==num[j]){

                    str+=num[j]
                    count++                        

                }
            }

            if(count==7){
                break;
            }

        }

        console.log(str)