Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions testFile1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const a = 5;

if (a === 1) {
console.log('P');
} else if (a === 2) console.log('D');
else console.log('G');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single-line block should be wrapped with curly braces.


for (let index = 0; index < 15; index++) console.log(index);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single-line block should be wrapped with curly braces.


if (a > 2) {
const b = 15;
const c = 16;
const d = 17;

if (a < 15) {
const e = 19;

if (a === 10) console.log('test2');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single-line block should be wrapped with curly braces.

}
}

do console.log('a');
while (1);
Comment on lines +22 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single-line block should be wrapped with curly braces.


while (a < 100) {
console.log('AAA');
}

while (a < 100) console.log('AAA');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single-line block should be wrapped with curly braces.


for (const element of elements) {
console.log(element);
}