diff --git a/LengthofLastWord.rb b/LengthofLastWord.rb new file mode 100644 index 0000000..054940d --- /dev/null +++ b/LengthofLastWord.rb @@ -0,0 +1,4 @@ +def length_of_last_word(s) + x = s.split(" ") + return x.last.length +end \ No newline at end of file