i need to check if a boolean is true but i cant use a regular if query because that if query needs to be over the statement, that boolean = true so i can execute a code that NEEDS to be over the statement boolean = true
eingabe = prompt('1 = Addition, 2 = Subtraktion, 3 = Multiplikation, 4 = Division');
if(eingabe === '1' || '2' || '3' || '4') {
if(eingabe === '1') {
x = prompt('Bitte geben sie den ersten Summanden ein!');
y = prompt('Bitte geben sie den zweiten Summanden ein!');
fX = parseFloat(x);
fY = parseFloat(y);
ergebnis = Addition(fX, fY);
console.log('Die Summe ihrer Addition wurde berechnet und diese ist:', ergebnis);
statusCalc = true
if statusCalc is true, the first line is to be executed again, i cant just put the first line under the code because it couldnt execute it because it is now under it. i thought about using eventlisteners but apparently that doesnt work.
I ask the question the 2nd time now if you have problems with understanding, ask instead of closing the question
lmao
You can see what i tried up there.