01 / 06
You need not type the parameter you hand over
Run map over a string[] and TypeScript already knows that the function you handed over receives text. So there is no need to type the (f).
This working out is called type inference — types worked out for you.
const fruits: string[] = ["apple", "plum"];const lengths = fruits.map( (f) => f.length);console.log(lengths);Result
[5, 4]