Skip to content

Commit e8884f9

Browse files
committed
removed more invocation parens
1 parent 98792e2 commit e8884f9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

chapters/strings/finding-substrings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ You need to find the first or last occurrence of a search string within a messag
1010
## Solution
1111

1212
Use Javascript's indexOf() and lastIndexOf() to find the first and last occurrences of a string, respectively.
13-
Syntax: string.indexOf(searchstring, start)
13+
Syntax: string.indexOf searchstring, start
1414

1515
{% highlight coffeescript %}
1616
message = "This is a test string. This has a repeat or two. This might even have a third."
17-
message.indexOf("This",0)
17+
message.indexOf "This", 0
1818
# => 0
1919

2020
# Modifying the start parameter
21-
message.indexOf("This",5)
21+
message.indexOf "This", 5
2222
# => 23
2323

24-
message.lastIndexOf("This")
24+
message.lastIndexOf "This"
2525
# => 49
2626

2727
{% endhighlight %}

chapters/strings/repeating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Create an array of n+1 nulls, and then join it with the repetition string as the
1313

1414
{% highlight coffeescript %}
1515
# create a string of 10 foos
16-
Array(11).join('foo')
16+
Array(11).join 'foo'
1717

1818
# => "foofoofoofoofoofoofoofoofoofoo"
1919
{% endhighlight %}

0 commit comments

Comments
 (0)