Skip to content

Commit dd8f1fb

Browse files
committed
minor edits to 'learn to code'
1 parent 8889505 commit dd8f1fb

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

sites/en/learn-to-code/extra.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ We've gone over the basics, but Ruby has lots of other language features. Here's
1313
[Methods](http://codelikethis.com/lessons/ruby_objects/objects#behavior) and [Classes](http://codelikethis.com/lessons/ruby_objects/classes) are the heart of [Object-Oriented Programming](https://en.wikipedia.org/wiki/Object-oriented_programming). They
1414

1515
## ...and [lots more](http://codelikethis.com/lessons)...
16-

sites/en/learn-to-code/numbers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Q: What is 1 plus 2 times 3?
2828

2929
A: *It depends!*
3030

31-
(1 + 2) * 3 == 9
32-
1 + (2 * 3) == 7
31+
* `(1 + 2) * 3` is 9
32+
* `1 + (2 * 3)` is 7
3333

3434
# Parentheses Are Free
3535

@@ -62,9 +62,9 @@ Don't panic! The solution is easy.
6262
Numbers know a message that converts them into strings. `to_s` means "to string".
6363

6464
"1" + 2.to_s
65-
65+
6666
Likewise, strings know a message that converts them into numbers.
67-
67+
6868
1 + "2".to_i
6969

7070
`to_i` means "to integer".
@@ -75,7 +75,7 @@ Try this in irb!
7575

7676
# WTFixnum?
7777

78-
The error said `can't convert Fixnum into String`.
78+
The error said `can't convert Fixnum into String`.
7979

8080
Q: What is a Fixnum?
8181

sites/en/learn-to-code/strings.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,3 @@ Definitely try these out in irb! It's pretty fun.
4141
* What does your name look like, repeated 1000 times?
4242
* What is the tenth character of "Matz is nice"? (Trick question!)
4343

44-
# Interpolation
45-
46-
first = "Joe"
47-
last = "Smith"
48-
49-
`+` does *concatenation*
50-
51-
full = first + " " + last
52-
53-
`#{}` does *interpolation*
54-
55-
full = "#{first} #{last}"
56-

sites/en/ruby/strings.step

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ IRB
3535
message 'The code in the curly braces can be any valid Ruby statement. Try putting various things in the curly brackets to see what works and what doesn\'t.'
3636
end
3737

38+
tip <<-'MD'
39+
# Concatenation vs. Interpolation
40+
41+
first = "Joe"
42+
last = "Smith"
43+
44+
`+` does *concatenation*
45+
46+
full = first + " " + last
47+
48+
`#{}` does *interpolation*
49+
50+
full = "#{first} #{last}"
51+
MD
52+
3853
step do
3954
message "Try out some of these String methods."
4055
irb <<-IRB

0 commit comments

Comments
 (0)