home.social

#objectcoercion — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #objectcoercion, aggregated by home.social.

  1. Symbol.toPrimitive Changes Object Math?!

    This object LIES about its value! Symbol.toPrimitive lets objects control how they convert to numbers/strings. When you add 5, JavaScript asks the object what it wants to be. The result will SHOCK you!

    #javascript #javascripttricks #symbol.toprimitive #typecoercion #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectcoercion #javascriptbugs #advancedjavascript

    youtube.com/watch?v=YCOygXVLitc

  2. Symbol.toPrimitive Changes Object Math?!

    This object LIES about its value! Symbol.toPrimitive lets objects control how they convert to numbers/strings. When you add 5, JavaScript asks the object what it wants to be. The result will SHOCK you!

    #javascript #javascripttricks #symbol.toprimitive #typecoercion #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectcoercion #javascriptbugs #advancedjavascript

    youtube.com/watch?v=YCOygXVLitc