Skip to content
Open

Done #232

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ times. The entire program would look something like this:

```ruby
phrase = "Hello World!"
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase

puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
end
# ... The rest of the program

puts phrase
Expand Down Expand Up @@ -291,7 +291,7 @@ Let's end by talking briefly about one additional use of `#`. Programmers love
conventions, or agreed upon rules that help them talk to each other about code.
A common syntax convention for Ruby methods is to preface them with a `#`, and
in subsequent lessons, you might see method names written with a `#` in front of
them. For example, if a method is named 'greeting', rubyists will often refer to
it as `#greeting`. This is so that other rubyists can instantly recognize it as
a method, as opposed to a variable or a bareword or a class. But remember that
them. For example, if a method is named 'greeting', rubyists will often refer to
it as `#greeting`. This is so that other rubyists can instantly recognize it as
a method, as opposed to a variable or a bareword or a class. But remember that
when you write it in your code, it should be `greeting` and not `#greeting`.
5 changes: 5 additions & 0 deletions greeting.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def greeting
puts "Hello World"
end

greeting
25 changes: 13 additions & 12 deletions lib/example.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Use this space to code along with the readme

phrase = "Hello World!"
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
def say_hello_world_ten_times
phrase = "Hello World!"
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
puts phrase
end
Empty file added touch
Empty file.