Skip navigation
Can you predict what this JavaScript code will log?
0:00 / 0:21

Can you predict what this JavaScript code will log?

Google for Developers

@googledevs2.6M followers

Visit on X
66 likesDownloadOriginal post

25,208 views

Can you predict what this JavaScript code will log? The answer reveals why floating point calculations in code require special attention.

3 Comments

Comments from the original post on X (Twitter)

  • Google for Developers's profile picture

    @googledevs

    Here's a hint:

    7 likes

  • antony's profile picture

    @0xlac

    webdev discovering floats

    3 likes

  • Shangeeth Sivan's profile picture

    @shangeethsivan

    @grok answer this

    1 like