In programming, regular expressions are a pattern matching standard that allow you to match strings with patterns. They are mainly used for extracting and replacing strings. Regular expressions can be used to pull out information, like email addresses, from long files and can save A LOT of time. Imagine how long it would take to extract all email addresses one by one from a jumpled file of 2,000 employees!
Read MoreAs programming languages, Ruby and JavaScript are very different from another. They may be able to perform many of the same things, but they are optimal for different uses. JavaScript, for example, is a browser- based language that is useful for the client side. Ruby, on the other hand, is more well suited for the server side. This is probably why Ruby offers many more options for iteration compared to JavaScript. After all, looping isn't very necessary on the browser end.
Read MoreDo you remember how Ruby is an object-oriented language? The ability to create classes and objects allows Ruby to be very powerful. Classes are the basic "templates" from which objects are created. Objects are pretty much all the variables, functions, and data collection structures that we know. A great example would be a hash. Creating a new hash is actually creating a new instance of the class Hash. In fact, classes are objects, each an instance of the class Class! Classes are useful because they allow you to create variables and methods for the resulting object of each instance.
Read More