A simple calculator Java Script using a function eval.
In most cases, this function is rarely used in real projects. Still, it is worth trying to use the switch case design.
This is a simple example for reference. Data entry into the input field with subsequent validation by regular expressions is not used here.