Skip to content

Conversation

@joseangelcrn
Copy link

@joseangelcrn joseangelcrn commented Aug 30, 2025

if I understood the isograma´s logic 'reto' should return 'true', no?

//ISOGRAMAS (JavaScript)

const isograma = (palabras) => {
  let diccionario = new Map();
  
  //string vacio
  if(palabras.trim().length === 0){
    return true;
  }
  
  for(let i=0; i< palabras.length; i++){
    let letra = palabras.charAt(i);
    
    if(diccionario.has(letra)){
      return false;
    }else{
      diccionario.set(letra,1)
    }
  }
  
  
  return true;
}

isograma('reto')

 if I understood the isograma´s logic 'reto' should return 'true', no?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant