Note
eval() function takes a string and evaluates it as javascript code and executes it. This normally isn't very safe in some circunstances. It basically can leave your code open to hacks. However the only input we're allowing the user to give are numbers plus this is on the front-end side.