@vietdangsaudoi: Áo xịn thì vl

bá vịt nek 🦆
bá vịt nek 🦆
Open In TikTok:
Region: VN
Wednesday 07 October 2026 07:06:56 GMT
519
13
5
1

Music

Download

Comments

user102pzzg094
icy. :
em xin link quần
2026-10-08 12:51:09
0
dgtuhao
Dương Tú Hảo :
Cho mình xin if quần ạ
2026-10-08 15:49:31
0
To see more videos from user @vietdangsaudoi, please go to the Tikwm homepage.

Other Videos

No tutorial open, just me, the compiler, and a lot of patience 📚 (long one, worth the read) What it does: A `Book` class holds title, author, isbn, and availability. A `Member` class can borrow and return books. A `Library` class ties it all together — adding books, registering members, and running the whole system. Daniel registers as a member, borrows
No tutorial open, just me, the compiler, and a lot of patience 📚 (long one, worth the read) What it does: A `Book` class holds title, author, isbn, and availability. A `Member` class can borrow and return books. A `Library` class ties it all together — adding books, registering members, and running the whole system. Daniel registers as a member, borrows "Typescript Handbook," tries to borrow it again (blocked, because it's already checked out), then returns it successfully. Every single interaction logged and tracked. Why this was hard when I started: Three classes that all need to talk to each other is a completely different skill from writing one function in isolation. Member needs to know about Book. Library needs to know about both Member and Book. One typo in a property name and the whole chain breaks silently or throws an error three files away from where the actual mistake is. I kept confusing WHERE logic should live — should "borrowBook" check availability inside Member, or should Library handle that? (Answer: the object that owns the data should own the logic around it. Member owns borrowedBooks, so Member decides if borrowing is allowed.) The "aha" moment: Once I stopped treating classes like separate islands and started thinking of them as objects that pass each other around (Library holds Books and Members, Member holds Books it borrowed), it clicked. This is literally how real apps model relationships — a user has orders, an order has products, etc. Pros of structuring it this way: Each class has ONE job. Book doesn't know how to borrow itself. Member doesn't know how to add a new book to the library. That separation makes debugging so much easier because when something breaks, you already know roughly where to look. Cons / what still trips me up: Private properties (like `memberId` and `borrowedBooks`) mean you can't just poke at the data directly from outside the class — you have to go through methods, which feels restrictive at first even though it's the whole point of encapsulation. This genuinely felt impossible a few weeks ago. Now it just feels like... work. Good work. comment "library system" if you want the breakdown of how the classes talk to each other #codetok #typescript #javascript #webdev #learntocode

About