Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
JS - Hacer [].incluye mayúsculas y minúsculas

Tarea:

Necesito verificar, si a partir de una cadena dada (caracteres) se puede hacer un documento (documento) si falta al menos 1 carácter en los caracteres, entonces no es posible crear un documento

Problema que ocurre:

Al comparar 'a' y 'A' con el método [].incluye, devuelve 'falso' en la función.

Código:

 function generateDocument(characters, document) { document = Array.from(new Set(document)); characters = Array.from(new Set(characters)); for(let i = 0; i < document.length; i++) { if(characters.includes(characters[i]) == false) return false; } return true; } console.log(generateDocument("A","a"));

Resultado esperado: devolver falso, porque 'a' y 'A' no son iguales

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!