Is gets.chomp a method?


#1

Is gets.chomp a method? Or what is it, actually?


#2

When you use just "gets" and press enter/return. You are actually adding a newline (\n) to the end of your string, ruby is actually literally taking the enter and adding it to the end of your input. As for the chomp, this is a method that can be called on a string. - Google search result of "gets.chomp meaning"

You should check this out: “GETS” AND “GETS.CHOMP” IN RUBY


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.