The length method


#1

Hello,

I am following the Length method lesson part.

I wrote the code asked and it went green (so I guess the code is good).

Why then, it shows the error “wrong number of arguments (given 0, expected 1)” in the console?

I am doing right or wrong? I don’t understand…


#2

puts expects one argument, zero given. You want to puts/print the length of a string.

this is done by doing:

puts "what you want to print"

#3

Thanks for the information. It was very unclear and now I understood! :blush:


#4