In this tutorial, we are going to create a relatively simple battle simulator project with n <= 5 battle units to fight between each other. The aim of the project is to achieve a complete and working JavaScript code. With this code, we will cover a lot of JavaScript language and coding concepts, such as object literal vs object constructor notation, functions vs. arrow functions – what’s the difference, and when and why to use each. We will also take a look at the concept of randomization and how Math.random() and Math.floor() methods can work in our favor. This will hopefully help you understand these concepts a bit better than reading about them individually. Let’s get started.