9 We cannot modify variables that are declared using `const` keyword.
10 It will raise a runtime error.
12 Under non ES2015 environment, it might be ignored merely.
16 This rule is aimed to flag modifying variables that are declared using `const` keyword.
18 Examples of **incorrect** code for this rule:
23 /*eslint no-const-assign: "error"*/
35 /*eslint no-const-assign: "error"*/
47 /*eslint no-const-assign: "error"*/
56 Examples of **correct** code for this rule:
61 /*eslint no-const-assign: "error"*/
73 /*eslint no-const-assign: "error"*/
76 for (const a in [1, 2, 3]) { // `a` is re-defined (not modified) on each loop step.
86 /*eslint no-const-assign: "error"*/
89 for (const a of [1, 2, 3]) { // `a` is re-defined (not modified) on each loop step.
98 If you don't want to be notified about modifying variables that are declared using `const` keyword, you can safely disable this rule.