12.Call and response


#1

Help! This is my code =

age = 26
[age].respond_to?(:push)

What am I doing wrong?


#2

Hi you should not put age between []


#3

Thanks! That really helped me


#4

age = 26
[age].respond_to?(:push)
thats my code still it runs!!.....why so?......and can u explain call and response in a lucid way!!


#5

Hi yes your code run because it rigth ....then look at the ....

instruction
Rather than checking to see if our age variable is an integer, check to see if it will .respond_to? the .next method. (.next will return the integer immediately following the integer it's called on, meaning 4.next will return 5.)
So I assume that yesokay did change the method from .push to .next because with .next without the [] it works

age = 26

# Add your code below!
age.respond_to?(:next)