3 arrays with 5 elements each. I thought I could use 3 loops but I still cannot figure out how can I do it, is there any place where I can learn about this? This is the example code I got.
const arr1 = [1,2,3,4,5]
const arr2 = [6,7,8,9,0]
const arr3 = ['a', 'b', 'c', 'd', 'e']
for (let x = 0; x < arr1.length; x++) {
for (let y = 0; y < arr2.length; y++) {
for (let z = 0; z < arr3.length; z++) {
}
}
}
// Output e.g. 16a, 17a, 18a, 19a, 10a, 16b, 17b
What do you mean by "unique value"?
Well the simplest value is probably digit sum
So array items can be strings or numbers
Oh uhhh those example outputs are just concatenations of all the elements?
To make it easier, lets say all of them are strings
Обсуждают сегодня