SyntaxError: for-of loop head declarations cannot have an initializer (Edge) SyntaxError: a declaration in the head of a for-of loop can't have an initializer (Firefox) SyntaxError: for-of loop variable declaration may not have an initializer. (Chrome)
Cause of Error: The loop contains an initialization that is invalid inside for-of loops.
10 20 30
Example 2: This example contains an invalid initialization inside the head of for-of the loop.
SyntaxError: for-of loop variable declaration may not have an initializer.