• 4 Posts
  • 485 Comments
Joined 1 year ago
cake
Cake day: December 13th, 2024

help-circle












  • To add to my own comment, I want to remind you that JavaScript was designed to power websites, and having an entire website break because an array didn’t have anything in it yet is probably worse than the alternative.

    A lot of JS’ decisions actually make sense when you understand its history. That doesn’t mean it’s a great language, but it’s undeniably good at fulfilling its original purpose, making websites interactive in myriad different browser implementations.


  • I’m sorry but your problem here is solely with JavaScript, not TypeScript. TS is right to assign that type to the value, because that is perfectly valid JS, and that is the type you should expect.

    It’s not hard to check for undefined and there are absolutely times you wouldn’t want an error to be thrown, so this is just you having a preference, and judging an entire language based on your preference.

    There are actual reasons to dislike how JS works, out of bounds array access returning undefined is not one of them.





  • On that budget, you should be looking for something like an Intel N100 tablet.

    Other than that, you’d probably need to go used to fit in your budget, but then you might have to worry about the battery being in good condition, but you said that’s not a big deal.

    Chuwi makes a tablet that might interest you called the Hi10 Max. I’ve owned two of their machines, and they’re fine. Not great, but not bad.