I am currently learning JS but I thought I'd give it a shot and create this conversion. I don't know what I am doing wrong and I'd appreciate if anyone can guide me.
const box = prompt('Enter Number');
function numberName(n){
const lNumbers = ["","Zero",'One', 'Two', 'Three', 'Four', 'Five']
if (n==0){
const a = lNumbers.indexOf("Zero");
console.log(a);
}