DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
TypeScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
TypeScript
In `function pair<T, U>(first: T, second: U): [T, U]`, how are T and U determined when calling pair("hello", 42)?
A
They must both be explicitly specified
B
Each is inferred independently from its corresponding argument — T from "hello" (string), U from 42 (number)
C
T and U are always the same type
D
This call would fail to compile
Check Answer