I am looking to iterate over a list of values using javascript.
I have a list like this
Label: A Value: Test Count: 4
Label: B Value: Test2 Count: 2
Label: C Value: Test3 Count: 4
Label: D Value: Test4 Count: 1
Label: C Value: Test5 Count: 1
My goal is to pass each row into different functions based on the label. I am trying to figure out if a multidimensional array is the best way to go.
well it's been 8 years but today you can use for ... of
const array1 = ['a', 'b', 'c'];
for (const element of array1) {
console.log(element);
}
source : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With