Ruby like Arrays in JS