Why does my code doesn't work?

Cuéntanos qué está pasando:
Describe tu problema en detalle aquí.

  **Tu código hasta el momento**

const names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];

function golfScore(par, strokes) {
// Cambia solo el código debajo de esta línea
if (golfScore === 4, 1){
  return "Hole-in-one!";
else if (golfScore === 4, 2){
  return "Eagle";
return "Change Me";
// Cambia solo el código encima de esta línea

console.log(golfScore(5, 4));
  **Información de tu navegador:**

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Desafío: Código de golf

Enlaza al desafío:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Trying to write code that only works for the tests is bad.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.