My first JavaScript project - Seeking feedback

Hi everyone.

This is my first Javascript project. It’s a “mini game” where you can choose a character with different stats and round after round the code will handle the rest.

Could I please have a feedback? I would really appreciate it.

Here you can play it.
And here you can check the code.

Looking forward to get some feedback!

Have a good rest of the day.


Only had a short time to review/play but the code looks clean and well organized. A few thoughts:

  • One of the times I tried to select a character it said I couldn’t choose the same as CPU. Perhaps choose CPU after player choice?
  • Use a form instead of a prompt to get player name, it disturbs the flow after clicking play to be held up by a prompt.
  • Layout/styling-wise:
    – On image hover, try to make it grow without disturbing the other content.
    – On select, maybe show the stats in a specific stats box, in the middle horizontally, above or below all the characters.
  • Minor thing, but I would change ‘${unit} it’s being attacked’ to ‘${unit} is being attacked’
  • Another minor thing, if you can get rid of the double-quotes in the log showing damage during play would look cleaner.

Hi Alan!

Thanks a lot for taking time to review my project!

I’ll be working on the point you raised in the upcoming days :slight_smile: .

Have a nice day!

1 Like