Calcsimple -

let display = "0"; let memory = 0; let lastOp = null; let waitingForOperand = false; function inputDigit(d) /* handle overflow, leading zero */ function inputOperation(op) if (!waitingForOperand) calculate(); lastOp = op; waitingForOperand = true;

End of guide. Now go calculate something simple. calcsimple

function calculate() let result = eval(prev + lastOp + current); // simplistic display = result; waitingForOperand = true; let display = "0"; let memory = 0;

Use parseFloat and toFixed(10) to avoid floating point noise. [ CE ] clear last number [ C ] clear everything [ M+ ] store display to memory [ MR ] recall memory [ MC ] clear memory Percent rules: A * B% = B% of A A + B% = A + (B% of A) A - B% = A - (B% of A) [ CE ] clear last number [ C

Title

Thank you for choosing HappyROMs

Submit page information

Attach files/images

I can't download the file
I can't install the file
The file is not supported
The file doesn't exist
Request for update
Others
Upload (Document or Image)