Java Insert Element Into Array Javascript Length Function In Python