I need to convert two arrays of strings with the same length:
const arr1 = ['Jessica', 'Ben', 'Samantha', 'John', 'Sandy'];
const arr2 = ['21', '45', '34', '90', '67'];
And in the end i need to get this array with particular keys name, age:
const result = [
{ name: 'Jessica', age: '21'},
{ name: 'Ben', age: '45'},
{ name: 'Samantha', age: '34'},
{ name: 'John', age: '90' },
{ name: 'Sandy', age: '67' },
];
Can you tell me please how can i do it?