Java Insert Element Into Array Javascript Iterations Of Artificial Intelligence