Java Push Into Array Javascript Length Converter