Skip to content

Completed Methods Lab#25

Open
cmhorsey wants to merge 1 commit into
learn-co-curriculum:mainfrom
cmhorsey:test_branch
Open

Completed Methods Lab#25
cmhorsey wants to merge 1 commit into
learn-co-curriculum:mainfrom
cmhorsey:test_branch

Conversation

@cmhorsey
Copy link
Copy Markdown

@cmhorsey cmhorsey commented Jul 8, 2024

Practiced converting JavaScript functions into Ruby Methods.

Comment thread methods.rb
return nil
end

return num / 2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The final line of a ruby method is always returned. No need to explicitly return here.

Suggested change
return num / 2
num / 2

Comment thread methods.rb
Comment on lines +13 to +15
def add (num1, num2)
return num1 + num2
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants