Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Does a for...of loop must contain a variable without assignment sign, and why?
Post
Does a for...of loop must contain a variable without assignment sign, and why?
+0
−4
The following code pattern reflects this answer.
This code contains a for...of
loop:
for (const child of e.childNodes) {
// Do stuff;
}
Does a for...of
loop must contain a variable without assignment sign (=
), and why?
Is there a way to achieve the same result with "regular" variable declaration?
1 comment thread