Check out example codes for "typescript map array". It will help you in understanding the concepts better.

Code Example 1

var numbers = [4, 9, 16, 25];
var x = numbers.map(Math.sqrt)

document.getElementById("demo").innerHTML = x;

Learn ReactJs, React Native from akashmittal.com