TypeScript Associate — Easy
Key points
- The return type of the function is explicitly defined as string.
- This ensures that the function will only return values of type string.
- The function cannot return any other data type based on the declared return type.
Ready to go further?
Related questions
