Ruby characters Flashcards
puts
Shows whatever comes next and inserts a line break
” “ - double quotes
Defines what will be written to the screen.
- hashtag
Leaves comments that will not be read by the code.
+ - plus
Addition between numbers
- minus
Subtract between numbers
/ - slash
Division between numbers
- asterisk
Multiplication between numbers
% - moduls
Grabs the remainder after a division
Determines if number on left is less than on the right
>
- great than
Determines if number on left is greater than on the right
Determines if number on left is less than OR eaqual to number on the right
> = - greater than equal
Determines if number on left is greater than OR eaqual to number on the right
x = - variable
Sets the string on the left to whatever is on the right. Can use these in functions or in quotes.
_ - underscore
Used to add a space when that is not allowed, ex. in variable names, or functions
{x} - ?
Used with double quotes to use variables previously stated
Command to write variables and text to the screen WITHOUT adding a new line at the end
formatter
I have no idea
\n - backslash n (escape)
New line character
””” - triple quotes
Put at the beginning and end to write a bunch of text over several lines.
\ - backslash (escape)
Allows the backslash to be read as a stand alone character instead of an escape