Introduction Flashcards
single line comment
comment
single line comment
comment
multi-line comment
=begin this is a multi line comment =end
Boolean
true or false
string
“just text”
prints a value in the console
puts
prints a value but adds a line break
methods
a “skill” or feature of an objec
.length
shows the length of characters in a string
.reverse
reverses a string
.upcase
capitalises an entire string
.downcase
converts a string to all lowercase
gets
retrieves user input
.chomp
removes a blank line
{variable}
retrieves variable data (user input) and inserts in a string
if
evaluates something to true or false
elsif
to insert another evaluations after an “if”
else
evaluates everything else if the first “if” or “elsif” are false
comparator
a sign that compares to values such as
== “is equal to”
< is less than
less than
>
greater than
<=
less than or equal to
> =
greater than or equal to
!=
not equal to
==
equal to
&&
and
||
or