Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Basics (Retired) Ruby Methods Method Arguments: Part 1

LOST IN ABSURDITIES...........HELP

I was doing so well up until now, basically I don't understand what the argument is .

method.rb
def hello (a, b)
  puts "#{a}, #{b}, Whats your name?"
  puts a + b
end
hello (oi, YOU!)

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Ok you went all out here. It's important when doing a challenge to try not to do anything it doesn't explicitly ask for. Even if functional, this can cause the challenge to fail. But this challenge simply wants you to define a function named hello that takes one argument. When we say "argument" we mean piece of information coming into the function from another piece of code. Take a look at my solution:

def hello(name)
end

This defines a function that takes one argument called name. Hope this helps! :sparkles:

thanks for elaborating on it!! Whats your Tech background?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I'm not sure I understand the question. I've worked as tech support for networks. I repair computers and provide customer support for end users. I studied computer science at a university ages ago. But then I stopped programming for about 15 years. I'm just getting back into it and everything is so much different :smiley: