Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMustafa Khan
6,224 PointsElse if
Why couldn’t Craig just use an else if statement instead of creating a private method at 4:00?
2 Answers
Christopher Sullivan
4,230 PointsHey are you referring to line 77?
Gonzalo Torres del Fierro
Courses Plus Student 16,751 PointsI think it is possible with the else if(statement), but maybe the reason it is to share "when and how", to create a private method ( we can see that is not so different than the public one) and at the same time showing not to get "DRY". But Craig has the last word on this.....
Mustafa Khan
6,224 PointsMustafa Khan
6,224 PointsI don’t know, but you can see he addresses the DRY issue by creating a private method to check the first character of a word