Untitled
unknown
plain_text
a year ago
153 B
6
Indexable
unction identity<T>(arg: T): T {
return arg;
}
const result = identity<string>("Hello, Generics!");
console.log(result); // Output: Hello, Generics!Editor is loading...
Leave a Comment
unction identity<T>(arg: T): T {
return arg;
}
const result = identity<string>("Hello, Generics!");
console.log(result); // Output: Hello, Generics!