Setting up the “If” branch part 1


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"
    puts " try again #{user_imput}"

Not 100% sure what I am missing...


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?


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