Generic
Reusable types.
💡 THINK OF IT LIKE…
▸ YOUR TURN
Write function first<T>(arr: T[]): T { return arr[0]; }
Tab indent · Shift+Tab outdent · ⌘/Ctrl + Enter submit · auto-pairs ( [ { " '
Reusable types.
Write function first<T>(arr: T[]): T { return arr[0]; }