Skip to content

Files

Latest commit

 

History

History

Day 43

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Highest Scoring Word

Instructions

  • Given a string of words, you need to find the highest scoring word.
  • Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc.
  • You need to return the highest scoring word as a string.
  • If two words score the same, return the word that appears earliest in the original string.
  • All letters will be lowercase and all inputs will be valid.

Challenges (0/2 done)

  • high('man i need a taxi up to ubud') should return 'taxi'
  • high('what time are we climbing up the volcano') should return 'volcano'
function high(x) {
  //code your magic here
}