DEV Community

DPC
DPC

Posted on

8 3 4 4 5

Daily JavaScript Challenge #JS-70: Find Missing Letter in Alphabet Sequence

Daily JavaScript Challenge: Find Missing Letter in Alphabet Sequence

Hey fellow developers! 👋 Welcome to today's JavaScript coding challenge. Let's keep those programming skills sharp!

The Challenge

Difficulty: Easy

Topic: String Manipulation

Description

Given a sequence of consecutive letters in the alphabet, find the missing letter in the sequence. The function receives an array of lowercase characters representing a range from any starting letter of the alphabet to ending. The sequence will always have one letter missing, and the array length will always be 1 to 25 (inclusive). Return the missing letter as lowercase.

Ready to Begin?

https://www.dpcdev.com/

  1. Fork this challenge
  2. Write your solution
  3. Test it against the provided test cases
  4. Share your approach in the comments below!

Want to Learn More?

Check out the documentation about this topic here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt

Join the Discussion!

  • How did you approach this problem?
  • Did you find any interesting edge cases?
  • What was your biggest learning from this challenge?

Let's learn together! Drop your thoughts and questions in the comments below. 👇


This is part of our Daily JavaScript Challenge series. Follow me for daily programming challenges and let's grow together! 🚀

javascript #programming #coding #dailycodingchallenge #webdev

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (4)

Collapse
 
delulu_man_in_js profile image
Annabelle Ng • Edited

why the comment is empty~

tried an approach without using the charCodeAt

function findMissingAlphabet (letters) {
    const alphabet = 'abcdefghijklmnopqrstuvwxyz';
    const startIndex = alphabet.indexOf(letters[0]);

    const fullChar = alphabet.slice(startIndex, startIndex+letters.length+1);
    const fullLetters = [...fullChar];
    for (let i = 0; i < fullLetters.length; i++) {
        if (fullLetters[i] !== letters[i]) return fullLetters[i];
    }
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
delulu_man_in_js profile image
Annabelle Ng

but miss the challenge, looks like we can't post answer to old challenge 🤔

Collapse
 
dpc profile image
DPC

Thanks for your comment! Very very soon you will be able to code on old challenges! Currently working on it

Thread Thread
 
delulu_man_in_js profile image
Annabelle Ng

Thank you for all the effort! It’s already great as it is—even without access to old challenges👏✨

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay