Kunal Mahajan: Dev BootCamp

"The tale of my journey on becoming a Junior Web Developer..."

Kunal's Picture

DBC-Technical Blog:

Date: 08.23.15
Entry #: 7

Commentary:

My classmates and I, (Chi-Mud Turtles 2015) have spent the last (6) weeks programming in Ruby and this week, (week 7 of phase 0) we began learning Javascript. What I found is that for the most part, the similarities between both languages are profound, albeit some syntactical differences. I wanted to share some information I've picked up, (amongst quite a bit) with one, (amongst a handful) key difference between the two languages -the naming/calling of variables.

In Ruby, the simplest way to define a variable is in the following format:
name = "Kunal"
puts name >> Kunal

In Javascript, the simplest way to define a variable is in the following format:
var name = "Kunal"
console.log(name) >> Kunal

As you can see, the general sense of naming/calling variables are relatively similar only in Javascript there needs to be a little extra work in order to achieve the same results.