So basically this project is almost done. But when I was 'testing' it, I found out, that I can't create multiple dots. I know why I can't do that :
// if there is any dot, and user want to add another dot, then return
if(containDot && operand == '.') return;
So, the problem is that I have no other idea, how can I block adding multiple dots on ONE number and at the same time allow adding it into another numbers with idea for making operations with eval();
Here's link to code: https://codepen.io/Igor34/pen/LYyoZMR
I modified your code to split the text into each number and look for a dot only on the last number.
const currentOperator = this.currentScreen.textContent.split(/[-+\\/\\*]/).pop();
// if there is any dot, and user want to add another dot, then return
if (currentOperator.includes(".") && operand === ".") return
// LINE BELOW REMOVED
// if(containDot && operand == '.') return;