You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
these are meant to be taken in order when you enroll in the foundations track. typeof is a challenge before you encounter keyof. perhaps we should remove these from the explore page and point them to the track
i also don’t understand the best practice part of your comment. the pref would usually be typeof standalone so you can reuse the type and making a separate type if you needed the union
Description
I think it's necessary to provide example with usage of both
keyof
&typeof
operators.The final solution like this will be more clear.
Explanation
In my opinion, after completing challenge with usage of
keyof
operator newcomer might think, that provided examples are only valid way of usingkeyof
.In other words:
keyof
with this type.But in real world there are a lot of examples of using both
keyof
&typeof
operators together.I consider this as best practice.
The text was updated successfully, but these errors were encountered: