freeCodeCamp/curriculum/challenges/spanish/02-javascript-algorithms-an.../intermediate-algorithm-scri.../missing-letters.spanish.md

2.0 KiB

id title isRequired challengeType videoUrl localeTitle
af7588ade1100bde429baf20 Missing letters true 5 Cartas perdidas

Description

Encuentra la letra que falta en el rango de letras aprobadas y devuélvela. Si todas las letras están presentes en el rango, devuelve indefinido. Recuerda usar Read-Search-Ask si te atascas. Trate de emparejar el programa. Escribe tu propio código.

Instructions

Tests

tests:
  - text: <code>fearNotLetter(&quot;abce&quot;)</code> debe devolver &quot;d&quot;.
    testString: 'assert.deepEqual(fearNotLetter("abce"), "d", "<code>fearNotLetter("abce")</code> should return "d".");'
  - text: <code>fearNotLetter(&quot;abcdefghjklmno&quot;)</code> debe devolver &quot;i&quot;.
    testString: 'assert.deepEqual(fearNotLetter("abcdefghjklmno"), "i", "<code>fearNotLetter("abcdefghjklmno")</code> should return "i".");'
  - text: <code>fearNotLetter(&quot;stvwx&quot;)</code> debería devolver &quot;u&quot;.
    testString: 'assert.deepEqual(fearNotLetter("stvwx"), "u", "<code>fearNotLetter("stvwx")</code> should return "u".");'
  - text: <code>fearNotLetter(&quot;bcdf&quot;)</code> debe devolver &quot;e&quot;.
    testString: 'assert.deepEqual(fearNotLetter("bcdf"), "e", "<code>fearNotLetter("bcdf")</code> should return "e".");'
  - text: <code>fearNotLetter(&quot;abcdefghijklmnopqrstuvwxyz&quot;)</code> debe devolver undefined.
    testString: 'assert.isUndefined(fearNotLetter("abcdefghijklmnopqrstuvwxyz"), "<code>fearNotLetter("abcdefghijklmnopqrstuvwxyz")</code> should return undefined.");'

Challenge Seed

function fearNotLetter(str) {
  return str;
}

fearNotLetter("abce");

Solution

// solution required