Attempting to reassign a value to a variable declared with const.
Variables declared using the const keyword are block-scoped and read-only. Once bound, their value cannot be reassigned. Attempting to assign a new value to a const variable throws TypeError.
Using const for counters, loop variables, or variables that need their values updated later in the code execution flow.
1const maxRetries = 3;2maxRetries = 5; // TypeError: Assignment to constant variable1// Fix: Declare with let if the variable needs to be reassigned2let maxRetries = 3;3maxRetries = 5; // Allowed!Simulate standard system builds to trigger compiler trace records and track memory crashes locally.
maxRetries is declared with const. Reassigning maxRetries = 5 is forbidden by JavaScript engine specification, raising a runtime TypeError.