+ 3
â¨â¨đChallangeđâ¨â¨
đąâ¨Write an HTML keyboardâ¨đą https://code.sololearn.com/Wk6Y3eM6i4An/?ref=app
2 Answers
+ 5
It's not "keyword" but "keyboard": that's not the same meaning ;P
Anyway, you could improve your code by replacing all your specific function calls from event listener (which required a bunch of unuseful function) by direct call to your write() main function (wich will became unique):
<button onclick="write('đ')">đ</button>
or even:
<button onclick="write(this)">đ</button>
and modify your write() function as:
function write(s) {
disp.innerText += s.textContent;
}
+ 8
@visph corrected it! New mod tools are awesome ^^