I am not able to get the desired output from below code, please help!

const score = {
wins: 0,
losses: 0,
ties: 0

  }if(result === 'You Win'){
        score.wins = score.wins + 1;

      } else if(result === 'You Lose'){
        score.losses = score.losses + 1;

      }else if(result === 'Tie'){
        score.ties = score.ties + 1;
      }

Please Ignore, I have already found the solution.