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

help-circle


  • Victor@lemmy.worldtoProgrammer Humor@programming.devJavaScript
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    edit-2
    8 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.


  • If the projector supports apps, maybe it can run Plex/Jellyfin? Otherwise maybe I would have another small Pi or a small laptop or something that would use the projector as its output. I’m assuming the projector doesn’t support HDR so a regular browser connecting to Plex could work.

    I just use my HDR-enabled smart TV to connect to Plex and Jellyfin. 🤷‍♂️


  • My future plans include setting up a NAS storage and connecting that to a Pi which would be always on. The Pi would be a torrent seeder, and a Plex/Jellyfin server as well.

    This way my trusty desktop computer can rest after being on 24/7 for like 4 years now. Poor thing.

    I haven’t tried this yet, so I can’t report on how well it works. But maybe it can serve as inspiration for you.