Skip to content

Commit 054d3ac

Browse files
committed
practice spllit() & join() & toUpperCase()
1 parent bd99bf5 commit 054d3ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,21 @@
1414
// You will need to come up with an appropriate name for the function
1515
// Use the MDN string documentation to help you find a solution
1616
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
17+
18+
19+
//1- methodo that take space add _ ?
20+
//2- methodo find first index of ech word
21+
//3- methodo to tranform string to upercase = toUpperCase()
22+
//4- return the value
23+
24+
25+
26+
function takeSapcestoUpercase (textSnake){
27+
28+
let takespace = textExemple.split(" ");// returns array nned to tranform to string again before upercase
29+
let transfStringAgain = takespace.join("_");
30+
let changeUper = transfStringAgain.toUpperCase(1);
31+
return changeUper;
32+
};
33+
let textExemple = "hello there";
34+
console.log(takeSapcestoUpercase(textExemple));

0 commit comments

Comments
 (0)