#javasc — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #javasc, aggregated by home.social.
-
Why does this JavaScript negative zero exist?
Why does this JavaScript negative zero exist and break sign check. The JavaScript code checks if a value is negative with less than zero. In JavaScript -0 fails the check and passes as positive.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javasc...
-
Why does this JavaScript toFixed return string?
Why does this JavaScript toFixed return string in a sum. The JavaScript code uses toFixed for display and then adds the result. In JavaScript toFixed returns a string so addition concatenates.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javasc...