How to create parameters with arrays? : <p>I'm trying to set a parameter as an array, but I get "unexpected token..." at {name[2]}.</p>

<pre><code>// javascript


const name = ['Jin', 'Kazuya', 'Heiachi']
function Intro(name, profession, city) {
    document.write("My name is " + name + ", I'm a" + profession + " from" + city);
}

Intro({name[2]}, ' salesman', ' Chicago');
</code></pre>
