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

0

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

+3

First Post your code than we will able to help you

+3

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

+2

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

+2

In line 15 your percent spelling in wrong may be that problem occur on your code

+2

If yes please post your code to me

+1

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

0

You have not closed the opened bracket after innerHtml à line 24. Close it and run your program.šŸ˜‰

0

Thanks, but it doesn't work

0

Yeah but I need that 5%=0.05

-2

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