Spr3/Online-Calculator

what the heck

Opened this issue · 2 comments

too much code
why do you need 150 lines

<input type="text" placeholder="Input equation" id="input" oninput="document.getElementById('output').textContent = (eval(document.getElementById('input').value))"/>
<p>answer: <span id="output"></span></p>

all handled client side u dont need to protect against an eval() attack
even if you did this is 100% not the way to go
image