TypeScript · Exercise 6 of 6 Previous
Intermediate
Zip Names and Scores
Build a small real helper. zip pairs each name with its score and should return a list of [name, score] tuples. It must accept both normal and read-only arrays.
Make the signature say so: read-only parameters and a return type of tuples [string, number][]. The checks pass frozen arrays in and assign the result to a tuple list.
What Check tests
- Your code has no type errors
- The result is a list of [string, number] tuples
- Frozen arrays are accepted
- Each row is a pair
- The console prints
Ravi:72
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Press Run to see the page.
Console
Nothing printed yet.