crete ruby-puts (#21524)

pull/18715/head^2
Cale Bybee 2018-11-14 09:18:55 -07:00 committed by Kristofer Koishigawa
parent 0a6d02cb33
commit 041a4fb2d4
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
---
title: Ruby Puts
---
The puts call is similar to the print call, with a few exceptions. The puts call will add a new line to the end of each argument, whereas print will simply print the argument as stated.
For example, `puts[1, 2, 3, 4, 5]` will output:
```ruby
1
2
3
4
5
```
While `print[1, 2, 3, 4, 5]` will output:
```ruby
[1, 2, 3, 4, 5]
```