🖥

Ruby | Output only line feed

に公開

Solution

OK if you put it without passing an argument.

 puts 

Example

 puts puts 'Gumi' puts puts 'Chocolate' puts puts 'Pine' puts 

image

problem

For example, you may want to add a line break at the beginning of the text. However, the following writing should be overwhelmed.

 puts "\nTEXT" 

 puts "\n" puts "TEXT" 

The solution is as described above.

environment

  • Ruby 2.3.0

Original by

Ruby | 改行だけを出力する

About

About this translattion

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2019-04-16

Discussion