While loop and do while loop in Ruby

The Ruby while loop is used to iterate a program several times. If the number of iterations is not fixed for a program, while loop is used. Ruby while loop executes a condition while a condition is true. Once the condition becomes false, while loop stops its execution. Syntax: Example: Output: Do…while loop: The Ruby […]

How to write case statement in Ruby?

In Ruby, Use ‘case‘ keyword instead of ‘switch‘ and ‘when‘ instead of ‘case‘. The case statement matches one statement with multiple conditions just like a switch statement in other languages. Syntax: Let’s understand, With Example: Output: Hope you understand how to write case statement program 🙂

Variable declaration in Ruby

We can describe the variable in 4 different types : Local variable Class variable Instance variable Global variable Let’s check, How variable works in their comfort zones. Local Variable: Always start with lowercase or underscore ( _ ). It works only in the variable declared block. For example, Class Variable: Always start with @@ and […]

How to start Ruby from scratch?

Hello Everyone, This is for who don’t know the Ruby programming language and want to learn this, But they don’t finding any source like how to start this. So, There are some guideline given to start from scratch for ruby. First of all, If you don’t know how to code…. no worry. Because, When you start learning ruby you get understanding about coding. If […]


Hi There, My name is Pruthviraj Rathod and I’m creator of this blog. To help you get started, here are a few questions: Going step by step from scratch. A fresher or any learner who loves programming can read this blog. Every day one post that can learn with a fresh mind and not be […]