I have an array containing objects that looks like this:
var persArr = [
{name: "Adam", age: 37},
{name: "Ben", age: 36},
{name: "Chris", age: 46}
];
What I would like to do is create a string variable which takes the given names in each object in the array and puts them together like this:
var str = "Adam, Ben, Chris";
Any suggestions as to achieve this?