LoginSignup
3
0

More than 3 years have passed since last update.

Ruby 勉強メモ(puts)

Posted at

概要

Rubyについて授業で習ったのでメモ。今回は主に数値や文字列を出力する際に使う'p', 'puts', 'print'メソッドの違いを調べたのでいかに記す。

メソッド 改行 引数の型情報の表示
p o o
puts o x
print x x

また、pメソッドだと"Hellow World"という引数で出力したとき両端のタブルクオーテーションも出力される

参考ページ

I(puts)]https://qiita.com/Chinats/items/c464c3a88c263f15224b

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0