Uh-oh, you've been given a nice opportunity to make some money... from the devil! It's quite simple. In a box of 25 drawers, there is a gold coin among them. all you have to do is find the coin, or else you lose your soul! Being a sporting person, the devil has 'graciously' allowed you to use your programming skills to find the gold coin. You have only one chance to open a drawer, so better put those programming skills to use! Find this object: {name: 'gold coin'} in a 2-dimensional array of objects provided to your function, findGoldCoin.
function findGoldCoin(drawers) { for(let i = 0; i < drawers.length; i++){ if(drawers[i][0].name === 'gold coin'){ return [0, i]; } for(let j = 0; j < drawers[i].length; j++){ if(drawers[i][j].name === 'gold coin'){ return [i, j]; } } } return `You lost your soul!`; }