Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ function changeStrRegister(str="tEST"){
let strResult = "";
for (let i = 0; i < str.length; i++){
if (str[i].toUpperCase() == str[i]){
strResult += str[i].toLowerCase()
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Дотримуйтесь одного стилю написання коду, якщо ставите крапку з комою, то ставте скрізь

} else { strResult += str[i].toUpperCase() }
strResult += str[i].toLowerCase();
} else {
strResult += str[i].toUpperCase();
}
}
return strResult;
}


console.log(changeStrRegister('ASdsASDS'))
console.log(changeStrRegister('ASdsASDS'));
10 changes: 7 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
let i = 3;
for (let i = 0; i > 2; i++) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

for (let i = 3; i > 2; i++) - і тоді верхня змінна let i = 3; є непотрібною.

console.log("Browser is doing wzzhhhh")
// let i = 3;
// for (let i = 0; i > 2; i++) {
// console.log("Browser is doing wzzhhhh")
// }

while (true) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Можна використати while(true) замість for цикла і змінної.

console.log("Browser is doing wzzhhhh");
}