[Tips] Something interesting about foreach() in TypeScript
[Tips] Something interesting about foreach() in TypeScript
This is just a note for myself. There are several ways to visit every element in a list. The most known way is for-loop. There are two different kinds of for-loop. One is foreach loop. Another one is traditional for-loop. Let’s check some examples.
foreach()
const array1 = ['a', 'b', 'c']; array1.forEach(item => { console.log(element); });
(more…)
View On WordPress
















