Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for...of...loop

const array = ['a', 'b', 'c', 'd'];
for (const item of array) {
	console.log(item)
}
// Result: a, b, c, d

const string = 'Ire Aderinokun';
for (const character of string) {
	console.log(character)
}
// Result: I, r, e, , A, d, e, r, i, n, o, k, u, n
Source by bitsofco.de #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+2 =