Created an array in Javascript and console.logged names