While we press the trigonometric function before any numbers, then followed with a number and equal sign will output an error. Instead of throwing the error screen, I added a try-catch block to display the "Error" on the calculator and also remove the use of eval() function as it is not a recommended way to do https://www.digitalocean.com/community/tutorials/js-eval#.
While we press the trigonometric function before any numbers, then followed with a number and equal sign will output an error. Instead of throwing the error screen, I added a try-catch block to display the "Error" on the calculator and also remove the use of eval() function as it is not a recommended way to do https://www.digitalocean.com/community/tutorials/js-eval#.