• 0 Posts
  • 435 Comments
Joined 8 months ago
cake
Cake day: November 14th, 2023

help-circle

  • enable the Do Not Disturb feature on your devices

    I don’t really need to do this ☝️, because I’ve done this 👇.

    and only grant notification permissions to essential apps

    Never do I get notifications that I don’t want, unless I’ve installed some new app and haven’t fine-tuned its notification settings yet, after allowing notifications from it at all. 👍

    Besides all that, I definitely agree that the FOSS lifestyle helps with a quiet digital existence. You only ever take part in information that you seek out on your own. Very nice.

    Also not having installed addictive apps like Instagram or Facebook with algorithm-controlled content, really helps keep away scroll addiction.
















  • Victor@lemmy.worldtoProgrammer Humor@programming.devJavaScript
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    edit-2
    10 days ago

    In node, I get the same result in both cases. "[object Object]"

    It’s calling the toString() method on both of them, which in the array case is the same as calling .join(",") on the array. For an empty array, that results in an empty string added to "[object Object]" at either end in the respective case in the picture.

    Not sure how we’d get 0 though. Anybody know an implementation that does that? Browsers do that maybe? Which way is spec compliant? Number([]) is 0, and I think maybe it’s in the spec that the algorithm for type coercion includes an initial attempt to convert to Number before falling back to toString()? I dunno, this is all off the top of my head.