Skip to content

Commit 2795463

Browse files
committed
refactored code
1 parent 027513b commit 2795463

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Sprint-3/3-mandatory-implement/2-cases.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
1717

1818
// define function
19-
function stringToUpperCase(str) {
19+
function stringToUpperCaseSnake(str) {
2020
//store string in upper snake case (calculation wont change store in const)
21-
const stringToUpperCaseResult = str.toUpperCase().replaceAll(" ", "_");
21+
const stringToUpperCaseSnakeResult = str.toUpperCase().replaceAll(" ", "_");
2222
// return result
23-
return stringToUpperCaseResult;
23+
return stringToUpperCaseSnakeResult;
2424
}
2525
// call function
26-
console.log(stringToUpperCase("welcome to cyf"));
26+
console.log(stringToUpperCaseSnake("welcome to cyf"));

0 commit comments

Comments
 (0)