+ 2

How similar are Ruby and JavaScript?

Perhaps they aren't similar at all, but I'm curious to know one way or another. A couple years ago, I began learning Ruby and actually got quite far in my lessons before running out of free material lol. Although it's been awhile, I know that what I learned us still filed away somewhere in my brain and would undoubtedly reveal itself if I encountered Ruby code or similar. I just started learning JS after completing HTML and CSS, so it's too soon to tell if there's any connection between JS and Ruby, but my curiosity got the better of me and so I decided I'd get your thoughts :-)

8th Nov 2018, 5:06 PM
Ashley Furin
Ashley Furin - avatar
6 ответов
+ 6
Ashley Furin At some point in your career, you will come to see many similarities across the different languages. Many of the concepts of any language are essentially the same. In the meantime, don't get hung up on the syntactical differences. Rather, draw parallels between common concepts, like looping constructs, how functions are implemented, variable scoping, conditional checks with if statements, etc.
8th Nov 2018, 10:10 PM
David Carroll
David Carroll - avatar
+ 4
as jay said ,ruby is more like python. it uses indentation,compared to js's braces,its weakly typed and can easily be confused with Python. its all multi-purpose unlike js thats specifically designed for web development
8th Nov 2018, 6:48 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
So would you say that an understanding of Ruby is of no benefit when learning JS? I guess that is my primary point in asking about the existence of similarities. I just hoped that my time spent learning Ruby might be helpful when learning JS, but it sounds as though that won't be the case :-/
8th Nov 2018, 7:34 PM
Ashley Furin
Ashley Furin - avatar
+ 2
theres an underlying foundation of all programming..the different languages do basucally the same thing..manipulate 1s and 0s. understanding a single language is always a benefit to learning another..as you will know the foundations of manipulating things via logic..so the only obsticle is learning how the new language does what you know needs to be done.
10th Nov 2018, 6:35 AM
Jason Kennedy
+ 1
Thanks so much for all the insight! As I continue, I'm seeing similarities (and differences). Overall, I feel as though my background in Ruby is definitely an asset in helping me learn JS. I can see how it would be much harder to understand if I hadn't previously used variables, booleans, etc.
11th Nov 2018, 12:08 AM
Ashley Furin
Ashley Furin - avatar
+ 1
Ruby is more like python, every programming language kind of has slightly same syntax
17th Jan 2019, 8:45 AM
Markpeach96
Markpeach96 - avatar