Skip to content

Commit

Permalink
edit add word
Browse files Browse the repository at this point in the history
  • Loading branch information
Ochiengsteven committed Nov 3, 2023
1 parent 6804cc2 commit 0bf9189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions morse_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def decode_word(morse_word)
def decode_sentence(morse_sentence)
morse_code_to_sentence = morse_sentence.split(' ')
sentence = ''
morse_code_to_sentence.each do |j|
sentence += "#{decode_word(j)} "
morse_code_to_sentence.each do |w|
sentence += "#{decode_word(w)} "
end
sentence.chop
end
Expand Down

0 comments on commit 0bf9189

Please sign in to comment.