re: Daily Challenge #110 - Love VS. Friendship VIEW POST

FULL DISCUSSION
 

A little solution for Ruby :) this was fun!

def wordsToMarks(word)
  strength = 0
  alphabet = ('a'..'z').to_a
  word.split('').each do |i|
    strength = strength + (alphabet.index(i) + 1)
  end
  return strength
end
code of conduct - report abuse