Now append two more elements “tennis” an “pool” in games array using push() method. This method returns the number of element in array after adding new elements.
Finally you can print the elements of array using console.log() function. You can also check the number of elements by printing total variable value.
Added above content in a html file and check access page in the browser. Now check the console of the browser, You will find the results as below screenshot.