Tony Mai Blog

The Musings of a Growing Developer
js
Feb 0
Feb 0

From Ruby Hashes to JavaScript Object Literals

From the perspective of someone who has a primer on Ruby and jumping onto JavaScript, I noticed something used very often in Ruby that is missing from JavaScript: Ruby Hashes. How can such a powerful data type not exist in other object-oriented languages? If you are also completely new to JavaScript and have the same […]

  Read more
array
Jan 0
Jan 0

What Are The Differences Between Ruby Arrays And Hashes, And When To Use Each?

Overview This is a pretty long blog, so I will seperate this post into three parts: Arrays Hashes Summary Arrays 1a. What is an Array? Do you find yourself assigning way too many variables to different values? Arrays are the solution to that. A array is a list of objects (strings, numbers, booleans, another array, […]

  Read more