js-mentorship-razvan / javascript

Javascript study notes
GNU General Public License v3.0
22 stars 2 forks source link

Solve 'Find the position!' #290

Closed odv closed 5 years ago

odv commented 5 years ago

https://www.codewars.com/kata/find-the-position/train/javascript

RazvanBugoi commented 5 years ago
function position(letter) {
    const alphabet = "abcdefghijklmnopqrstuvwxyz";
    return `Position of alphabet: ${alphabet.indexOf(letter) +1}`;
  }