Ruby Split String Into Array Javascript Length Of List