Assigning variables from an array one-by-one is time consuming and silly. Just use destructuring assignment to accomplish this quicker and easier:
let profile = ['bob', 34, 'carpenter'];
let [name, age, job] = profile;
console.log(name);
--> 'bob'
Source
https://levelup.gitconnected.com/6-javascript-code-snippets-for-solving-common-problems-33deb6cacef3