MCPcopy Create free account
hub / github.com/codemistic/Web-Development / flushOperation

Function flushOperation

Calculator app/calculator.js:9–22  ·  view source on GitHub ↗
(intBuffer)

Source from the content-addressed store, hash-verified

7});
8
9function flushOperation(intBuffer){
10 if(previousOperator === "+"){
11 runningTotal += intBuffer;
12 }
13 else if(previousOperator === '-'){
14 runningTotal -= intBuffer;
15 }
16 else if(previousOperator === "×"){
17 runningTotal *= intBuffer;
18 }
19 else{
20 runningTotal /= intBuffer;
21 }
22}
23function handleMath(value){
24 const intBuffer = parseInt(buffer);
25 if(runningTotal === 0){

Callers 2

handleMathFunction · 0.85
handleSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected