+ 3
✨✨🏆Challange🏆✨✨
🖱⌨Write an HTML keyboard⌨🖱 https://code.sololearn.com/Wk6Y3eM6i4An/?ref=app
2 Respuestas
+ 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 ^^