I'm curious if there's a more efficient way to achieve the following tasks without using traditional for loops. Task 1: Is there a smarter method to declare two arrays, particularly the numbers array (possibly using the dot operator)? Task 2: How can I combine the string elements of these two arrays into a third array without relying on old-fashioned loop structures, maybe utilizing Array.map() or Array.from()?
const letters = ['a', 'b', 'c', 'd'];
const numbers = [1, 2, 3, 4, 5, 6];
const combined = [];
for (let i=0; i < letters.length; i++) {
for (let j=0; j < numbers.length; j++) {
combined.push(letters[i] + numbers[j]);
}
}
// expected output: a1, a2, a3, a4, a5, a6, b1...