JavaScriptShort

0.1 + 0.2 = 0.30000000000000004?! 🤯

0:3378 views

JavaScript says 0.1 + 0.2 is 0.30000000000000004. It's not a bug: 0.1 can't be stored exactly in binary. Compare with a tolerance (Number.EPSILON), keep money in whole cents or paise, and round only when you display. ▶ Full explanation: [paste long video link] 💼 Need a developer hemantinsights.com/contact?type=project Voiceover: Kokoro TTS (Apache-2.0). Music: original.

HemantInsights

@hemantinsightsdev14 videos16 Shorts

↑ ↓ to move, Enter to open, Esc to close

Keyboard shortcuts

Ctrl+K
Search tools, articles and projects
/
Search
[
Previous lesson (on articles)
]
Next lesson (on articles)
T
Switch light / dark theme
GthenH
Go to the home page
GthenT
Go to the tools
GthenA
Go to the articles
?
Show this list