DEV Community

Cover image for From Ruby To JavaScript

From Ruby To JavaScript

mindful_developer profile image Biagio J Mendolia ・2 min read

Learning ruby as a first programming language has been truly enjoyable. Once I had finished my Rails project and was starting my JavaScript curriculum, I quickly noticed how readable and expressive Ruby was. I find Ruby to be expressive, intuitive, simple and powerful in many ways!

Code in Ruby seems to be easier on the eyes and brain when you’re learning it, where as in JavaScript, it sometimes can get a little confusing! For example, in Ruby, to declare a variable would be something like variable_name = value. In JavaScript you have a few different options on what kind of variable you want to declare. It could be either a var, let, or const. To Declare a variable would be something like this var varName = value. It’s small things like this in JavaScript that constantly trip me up! I feel like in ruby we are spoiled with the concept of convention over configuration. In Ruby there is more of a set way to do things and if you follow those guidelines, usually your code is clean and gentle on the eyes. I feel like JavaScript is best compared to the Wild West. There are a million ways to do something and all of those ways are acceptable as long as the goal is accomplished!

As I code with JavaScript more and more I start to understand how powerful it is. I find myself enjoying the language the more I learn about it! Being able to pass in functions as a parameter seems super powerful! Another thing that I enjoy about JavaScript is that you can make changes to how things work in the browser. When I first learned about event listeners I thought they were the coolest things. Having the power to make web pages more responsible is pretty cool!

Even though JavaScript is intimidating I’m eager to learn more and become proficient in the language !

Discussion (0)

Editor guide