Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 635 Bytes

File metadata and controls

20 lines (12 loc) · 635 Bytes

Chapter 1 Basic Ruby Literacy

Notes

Use irb to acess ruby directly in the terminal

>> 100 + 32
=> 132

Keep the terminal simple use --simple-prompt

Operations Example(s) Comments
print print "Hello" puts adds a newline to the string it outpus if there isn't one at the end already; print doesn't. Print prints exctly what it's told to and leaves the cursor at the end. (Note: On some platforms, an extra line is automatically output at the end of a program.) p outputs an inspect string, which may contain extra information about what it's printing.

Y