Awesome usage of the rest operator in this context, I really like this API. this looks more natural than using a string or an array for accessing a chain of properties.
For the return type, I would have returned null instead of undefined. From my understanding, null represents the intentional absence of a value, while undefined is a declared value that has not been provided. But I may be wrong on this one. What do you think? Should this function return null rather than undefined?
Anyway, good take on this one!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Nick!
Awesome usage of the rest operator in this context, I really like this API. this looks more natural than using a string or an array for accessing a chain of properties.
For the return type, I would have returned
null
instead ofundefined
. From my understanding,null
represents the intentional absence of a value, whileundefined
is a declared value that has not been provided. But I may be wrong on this one. What do you think? Should this function returnnull
rather thanundefined
?Anyway, good take on this one!