Feedback and help for my calculator

My calculator

I have a couple things I would like some help with:

  1. I used “eval” in my code. However, I recently found out it’s not recommended to use that due to various reasons. Can anyone give me tips of an alternate method?

  2. I noticed the TI-108 text gets pushed down slightly once the equation shows up on the screen. What’s causing this?

I would also like some feedback on how to improve this.

Thank you all in advance.

Don’t worry about it. The main problem with eval is that it runs arbitrary JavaScript, which is a huge problem if your app takes text input from users. Your calculator tokenizes the input by virtue of being a calculator, so aside from some completely unobservable performance issues, there’s no problem whatsoever with using eval here. Do refrain from using it any time in the future, though.

#equation has zero height until it’s filled with text, at which point it will push the text below it down.

Thanks for the help and information. I fixed the issue with #equation.