Menu
×
×
Correct!
Exercise:Complete the Generic:
function createPair<typeX, typeY>(x: typeX, y: typeY): [typeX, typeY] {
return [x, y];
}
console.log(createPair<string, number>('Meaning', 42));
Not CorrectClick here to try again. Correct!Next ❯function createPair, (x: typeX, y: typeY): [typeX, typeY] { return [x, y]; } console.log(createPair<string, number>('Meaning', 42)); |