Last Modified at 2019-06-25 21:29:27
In this tutorial, i am going to show you multiple methods of printing object array:
function that is used to convert object into a string.
var mycity=new Array();
document.getElementById('abc').innerHTML = JSON.stringify(mycity);
If you are debugging your code and want to print array using console.log()
function. See the code below: