कोड प्रॉम्प्ट मार्गदर्शिका पढ़ें
- प्रोग्रामिंग भाषा
- TypeScript
- कठिनाई
- मध्यम
Describe and format a structured user record.
interface User {
id: number;
name: string;
roles: string[];
}
function displayUser(user: User): string {
return `${user.id}: ${user.name}`;
}