You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Write a method that takes in a string as input, and returns the longest word in the string. You may assume the string is a sentence that containes only letters and spaces.
# Hint: Method to use: split
def longest_word(sentence)
end
p longest_word("this is the longest word within the sentence")=="sentence"