File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Sprint-2/3-mandatory-implement Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 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 ) ) ;
You can’t perform that action at this time.
0 commit comments