...

/

Printing Things

Printing Things

Learn another way to print something in Ruby.

Many exercises demonstrating Ruby basics include running a short program that outputs something to the terminal.

So far, we’ve mostly used the puts method to do that.

What can be used instead of puts?

However, there’s another method that’s even more useful when we’re trying to determine what a program is doing, why it’s doing it, and what might cause certain errors.

This is the p method. To understand p ...