Why does this JavaScript optional chaining hide the bug?

Why does this JavaScript optional chaining hide the bug in a form. The JavaScript code uses optional chaining when the value could be zero. In JavaScript 0 is valid but optional chaining skips it.

#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliab...

https://www.youtube.com/watch?v=Jz43pCMfK1s

Why does this JavaScript optional chaining hide the bug? #javascriptzero

YouTube