Setting up the “If” branch part 1


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-JdNDe/0/4?curriculum_id=5059f8619189a5000201fbcb


How is it going today good
undefined method `includes?' for nil:NilClass


print "How is it going today"
user_imput = gets.chomp.downcase!

if user_imput.includes? "s"
    print "Nice name"
else
    puts " try again #{user_imput}"
end


Not 100% sure what I am missing...


#2

first of all read the instruction again.

the variable name should be user_input not user_imput.
and in this lesson you don't need else statement

now here

if user_imput.includes? "s"

it should be .include? not .includes?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.