I need help with my % button | Sololearn: Learn to code for FREE!


I need help with my % button

I need help with my % button in my calculator

4/11/2021 2:59:17 PM

Raidel González Cabrera

10 Answers

New Answer


Hi, you already have code needed to do % calculation. so you don't need percent function. Change line 15, <button onclick="percent()">%</button> to <button onclick="add('%')">%</button> and remove function percent(key) cause it brings syntax error If you do that button % will work and will get result with function calc() hope that helps


My code https://code.sololearn.com/WVE6ATE9Xj2A/?ref=app


https://code.sololearn.com/WQ6isIZ2pR2b/?ref=app try like this.


You have not closed the opened bracket after innerHtml à line 24. Close it and run your program.😉


Thanks, but it doesn't work


Yeah but I need that 5%=0.05


Is it not working. I see from code button % is working