The example of a syntax error is:
A for loop uses commas instead of semicolons.
Syntax errors occur when the code deviates from the rules of the programming language, making it impossible for the code to be parsed and executed correctly. Using commas instead of semicolons in a for loop is a violation of syntax rules.