Section 1

Preview this deck

How to write a class?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (19)

Section 1

(19 cards)

How to write a class?

Front

Back

How to write an if statement?

Front

Notice the and operator Put end at the end Put a new line, or the word then instead of curly brackets

Back

How to convert an integer to a string?

Front

.to_s function.

Back

How to write a string variable?

Front

Puts is like echo or print in PHP Remember to alter quotes for words like can't

Back

How to render a variable?

Front

print or puts Print for multiple lines and puts for one

Back

What is the self key word?

Front

Everything is an object in Ruby. Ruby treats 'self' as the object in which it is currently referred to.

Back

String concatenation in Ruby?

Front

Back

How to return a range of numbers in Ruby?

Front

Use an array like this it will return 0 through 9 or in this case index of 6

Back

How to write an array in Ruby?

Front

There are many different ways, arrayd are complicated in ruby but can do a lot.

Back

Number variables?

Front

No coma or anything just simple number

Back

String interpolation in Ruby?

Front

Back

How to get the count or value of an array or length of a string?

Front

Back

How to write a simple loop?

Front

Put do end or just curly brackets instead

Back

How to tell if a number is even or odd?

Front

.even the question mark is a ternary operator

Back

How to index an array?

Front

array.at()

Back

How to write a function in Ruby?

Front

Back

How to write a for loop?

Front

Back