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