How to Use The Ruby Ternary Operator (?:)

What is a ternary operator in Ruby? A ternary operator is made of three parts, that’s where the word “ternary” comes from. These parts include a conditional statement & two possible outcomes. In other words, a ternary gives you a way to write a compact if/else expression in just one line of code. For example: … Read more

Understanding The Ruby Next & Break Keywords

Keywords, like next & break are part of the Ruby programming language, so if you want a complete understanding of Ruby you need to know how they work. What are they used for? Well, in Ruby, we have all kinds of loops. Like: while until each When writing a loop, you may want to skip … Read more