Ruby vs. JavaScript Cheat Sheet

Keeping it straight

February 26th, 2015 : 2 minutes

I've spent 4-5 weeks learning Ruby and now I'm learning JavaScript for the very first time. As I learn JS, here are some of the differences that I want to keep straight.

Ruby

JavaScript

...naming variables...

...determining an object's value type...

...printing to the console...

...methods/functions...

...comparison operators (all of those equal signs)...

...incrementing/decrementing by 1...

...array syntax; finding the index...

...objects vs. hashes...