this post was submitted on 13 Nov 2023
14 points (88.9% liked)

JavaScript

2008 readers
25 users here now

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 1 year ago (1 children)

In your example, without the comment, I'd have no way of knowing it was a customer ID I'm getting, unless the only objects with IDs are customers.

[โ€“] [email protected] 0 points 1 year ago

I mean, the example kinda implies that this is on a Customer type. Otherwise you'd have a method getCustomerId instead.