Fazza Razaq Amiarso• 2,340
@fazzaamiarso
Posted
Hello Giorgi! Nice Solution!
I have quick tips for you.
- You can simplify your
showNumber
function a lot.
function showNumber() {
//No need to check for value as all checks have the same statement
document.getElementById("number").innerHTML = this.value;
}
- It is recommended to use
===
instead of==
for equality checking. Why? because==
will try to convert the value to same type, which can makes it vulnerable to bugs.
I hope it helps! Cheers!
Marked as helpful
0
Giorgi• 200
@siduki
Posted
@fazzaamiarso Thank you.
How I understand, I can remove that line, where I check buttons value yes? My
0
Fazza Razaq Amiarso• 2,340
@fazzaamiarso
Posted
@siduki that's right
0