After following a tutorial on YouTube, going over the code multiple times, and still experiencing issues with the calculator. Sometimes it works fine, other times certain buttons like (+, -, x, ⁄) don't function properly. I've provided the entire code below as I suspect the issue lies in the JavaScript section. I initially started with HTML, then moved on to CSS and finally JS.
let runningTotal = 0;
let buffer = 0;
let previousOperator;
const screen = document.querySelector('.screen');
function buttonClick(value){
if (isNaN(value)){
handleSymbol(value);
}else{
handleNumber(value);
}
screen.innerText = buffer;
}
// Rest of JavaScript code goes here...
// More code snippets for CSS and HTML will follow...
Despite meticulously examining each line of code, the problem remains elusive.