Java Add New Element To Array Javascript Length Text