JavaScript user prompt 2d array lookup – Elf Name Generator

Started with what I thought was a simple idea for a class activity for our JavaScript unit, but falling foul best way to read a JavaScript 2D array based on a user input.

How can I get it to look up the users entry in the first index of the array and output the value in the second index? I need to tell it at some point which index to read and which to output, via similar syntax to [0][1] I imagine, but trial and error is getting me far.

Perhaps there is a better way??

Here is what I have so far, which just outputs the first array entry in its entirety – “A”,”Angelic”

var firstNames = [
["A","Angelic"],
["B","Blustery"],
........
["Y","Cheery"],
["Z","Dancy"]
];
var firstInitial = window.prompt("What is the first letter of your first name: ").toUpperCase();
let elfFirstName = firstNames.find(firstSearch);
function firstSearch(firstInitial) {
    return firstInitial;
}
window.alert("Your Elf Name is " + elfFirstName);
</script>```


Thanks