Terms: parameter, argument  

if a method takes arguments, we say it accepts or expects those arguments.

The argument is the piece of code you actually put between the method’s parentheses when you call it, and the parameter is the name you put between the method’s parentheses when you define it.

def square(number)
    puts number**2
end

square(2) 

# number <= parameter
# 2 <= argument

It is always good to know the terms right, again from Codecademy.

 
0
Kudos
 
0
Kudos

Now read this

how to start minitest - Ruby on Rails

From my previous post all the setup’s done for Rails, for minitest and Capybara. http://www.rubydoc.info/github/jnicklas/capybara https://github.com/blowmage/minitest-rails https://github.com/blowmage/minitest-rails-capybara I read those... Continue →