Bryan Gamotea's Personal Blog

A blogging framework for hackers... but I'm not a hacker.

Ruby

I took Ruby lessons in codeacademy last week. Some functions are the same with JavaScript and some are not like variable declaration, the “unless” statement, and many more.

This is how you declare a variable in JavaScript:

1
2
var my_num = 25;
var my_string = 'Bryan';

This is how it’s done in Ruby:

1
2
my_num = 25
my_string = 'Bryan'