--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: JsForOfStatement.js --- # Input ```jsx function JsForOfStatement1() { for (const key of value) { break; afterBreak(); } } function JsForOfStatement2() { for (const key of value) { continue; afterContinue(); } } ``` # Diagnostics ``` JsForOfStatement.js:4:9 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 2 │ for (const key of value) { 3 │ break; > 4 │ afterBreak(); │ ^^^^^^^^^^^^^ 5 │ } 6 │ } i ... because this statement will break the flow of the code beforehand 1 │ function JsForOfStatement1() { 2 │ for (const key of value) { > 3 │ break; │ ^^^^^^ 4 │ afterBreak(); 5 │ } ``` ``` JsForOfStatement.js:11:9 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 9 │ for (const key of value) { 10 │ continue; > 11 │ afterContinue(); │ ^^^^^^^^^^^^^^^^ 12 │ } 13 │ } i ... because this statement will continue the loop beforehand 8 │ function JsForOfStatement2() { 9 │ for (const key of value) { > 10 │ continue; │ ^^^^^^^^^ 11 │ afterContinue(); 12 │ } ```