Menu
×
×
Correct!
Exercise:Complete the Generic:
function createPair@(6), @(6)(x: typeX, y: typeY): [typeX, typeY] {
return [x, y];
}
console.log(createPair<string, number>('Meaning', 42));
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 ❯ |
This will reset the score of ALL 30 exercises.
Are you sure you want to continue?