PROGRAMMING
JavaScript
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
0 likes
Likes for this tutorial.
JavaScript Classes With Getters and Setters
Level: Intermediate
Getters compute a value when you read it, so totals never go stale. Setters check a value when you assign it, so a negative price throws instead of saving. With private fields, nobody can go around them.
4 min read
0 likes
Likes for this tutorial.
Custom Error Classes You Can Actually Catch
Level: Intermediate
Stop checking error messages with includes(). Extend Error, set name, add the fields the handler needs, catch with instanceof, and wrap low-level errors with cause so the real reason isn't lost.
4 min read