Steve's Array Cheatsheet for JavaScript & Ruby

Written by on Jun 21 2007

JavaScript

array_.push(_thing to push)

Ruby

array << thing to push

Notes

  • Although Array#push works in ruby, array#<< does not work in javascript.

(I just spent 45 minutes debugging this ;)

Meet
Steven

Hi I'm Steven,

I wrote the article you're reading... I lead the developers, write music, used to race motorcycles, and help clients find the right features to build on their product.

Get Blog Updates