Profile cover photo
Profile photo
mark reynolds
mark's posts

Post has attachment
How To Use The If conditional In Ruby
How do most computer languages evaluate and make simple decisions? Mostly through the use of the conditional 'If' statement. Whats more Ruby is no different though a lot might argue including myself a hell of a lot easier. So lets take a look at this statem...

Post has attachment
How To Assign Basic Values To Variable In Ruby
Assigning Values To Variables in Ruby is a pretty easy thing to do. Once you learn it there's no end to the fun you can have with this programming language. Here are a couple of examples as how you can manipulate variables and their values in Ruby. irb(main...

Post has attachment
Basic Variables In Ruby
Basic Variables Variables are very important in Ruby programming, but the good news is that you don;t have to be a rocket scientist to be able to understand them because they're really quite straightforward. For our first example we'll take a look at assign...

Post has attachment
Creating An Array Of Numbers In Ruby
Our next bite sized chunk of Ruby coding will focus on how to create a simple array of numbers. Okay, head on over to your favourite terminal, fire it up and input the following. irb(main):004:0> numbers = Array(0..9) Here we've set the numbers in our array...

Post has attachment
Removing Elements From A Ruby Array
In the last post we examined how to delete elements from the Ruby array using the .pop method. In this short code snippet we're going to take a look at how to use Ruby to add extra elements to the array via the .push method. As always head on over to your s...

Post has attachment
Reversing The Elements In A Ruby Array
So you've got your Ruby array and you want to reverse the elements in it! With the Ruby programming this task is easily accomplished with the following code. First off go and create an array in irb something like this. my_array = ['mark','dave',1,2,3,'x'] N...

Post has attachment
How To Add Extra Elements Into A Ruby Array
Adding Additional Things Into A Ruby Array Once you've got your array in Ruby you might want to add extra elements to it. With ruby this is easy. Create a new array, this time I've created an array of numbers. The keener eyed reader out there will have spot...
Wait while more posts are being loaded