const x = [10, 20, 30];

for (let i = 0; i < x.length; i++) {
    console.log(x[i]);
}



const x = [10, 20, 30];
let i = 0;

while (i < x.length) {
    console.log(x[i]);
    i++;
}



x = [10, 20, 30]
i = 0

while i < len(x):
    print(x[i])
    i += 1



const x = [10, 20, 30];
let i = 0;

do {
    console.log(x[i]);
    i++;
} while (i < x.length);



const x = [10, 20, 30];
let i = 0;

for (let i = 0; i < x.length; i++) {
    if (i === 0) { continue; }
    if (i === 2) { break; }
    console.log(x[i]); 
}



const x = [10, 20, 30];

for (const v of x) {
    console.log(v); 
}



const x = [10, 20, 30];

for (let i = 0; i < x.length; i++) {
    console.log(x[i]);
}



const x = { a: 10, b: 20, c: 30 };

for (const k in x) {
    console.log(x[k]); 
}



const array = [10, 20, 30];
array.forEach(v => console.log(v));

array.forEach((v, index) => console.log(index));



x = [10, 20, 30]

for v in x:
    print(v)

x = { "a": 10, "b": 20, "c": 30 }

for k in x:
    print(x[k])



x = [10, 20, 30]

for v in x:
    if x == 100:
        print("Found 100")
        break

else:
    print("Not Found")



x = [10, 20, 30]

for index, v in enumerate(x):
    print(index, v)



const x = [10, 20, 30];
x.map(v => v * 2);



x = [10, 20 , 30]
list(map(lambda v: v * 2, x))



x = [10, 20 , 30]
[v * 2 for v in x]



x = ["kawasaki", "yokohama", "urawa"]
{v: len(v) for v in x}



x = ["kawasaki", "yokohama", "urawa"]
{len(v) for v in x}



const x = [1, 2, 3];
x.filter(v => v % 2 === 0);



x = [1, 2, 3];
list(filter(lambda v: v % 2 == 0, x));



x = [1, 2, 3]
[v for v in x if v % 2 == 0]



const array = [1, 2, 3, 4];
array.reduce((result, v) => result + v);



array.reduce((result, v) => result + v, 10);



from functools import reduce

array = [1, 2, 3, 4]
reduce(lambda result, v: result + v, array)



reduce(lambda result, v: result + v, array, 10)
















