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 trial5 Answers
Ethan Lowry
Courses Plus Student 7,323 Points'chomp' is a method belonging to the String
class which removes content from the end of a given string. In its simplest usage, calling .chomp
on a string will remove any trailing whitespace, new lines etc. on the end of that string.
You can see examples and read more about chomp
and other String
methods over in the docs.
Andy Saini
5,287 Pointswhy are methods like .chomp used directly in treehouse videos without a proper introduction?
Caleb Kleveter
Treehouse Moderator 37,862 PointsThat is the one fault with the ruby courses, you don't know what some of the code is that he is using. The Ruby Foundations course was even worse; thankfully it was deprecated. If you want a more foundational understanding of Ruby, read Learn to Program by Chris Pine.
Andy Saini
5,287 PointsI've seen similar behaviour with many other courses too..
Jasmine Frantz
8,299 PointsGlad to hear I am not alone on this.
Jitli Gan
2,668 Pointsexactly^^