File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
exercises/concept/poetry-club-door-policy/.approaches Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,14 @@ This approach uses [`toLocaleUpperCase`][mdn-to-locale-upper-case] and [`toLocal
4141This approach is necessary when the language locale has a non-standard mapping between lower and uppercase.
4242
4343``` javascript
44- const str = " istanbul" ;
44+ const str = ' istanbul' ;
4545
46- str .toUpperCase ()
46+ str .toUpperCase ();
4747// => 'ISTANBUL'
48- str .toLocaleUpperCase (' en-US' )
48+ str .toLocaleUpperCase (' en-US' );
4949// => 'ISTANBUL'
5050
51- str .toLocaleUpperCase (' tr' )
51+ str .toLocaleUpperCase (' tr' );
5252// => 'İSTANBUL'
5353```
5454
@@ -60,15 +60,15 @@ export function frontDoorPassword(word) {
6060 if (charCode >= 97 ) {
6161 charCode -= 32 ;
6262 }
63-
63+
6464 let password = String .fromCharCode (charCode);
65-
65+
6666 for (let index = 1 ; index < word .length ; index++ ) {
6767 charCode = word .charCodeAt (index);
6868 if (charCode <= 90 ) {
6969 charCode += 32 ;
7070 }
71-
71+
7272 password += String .fromCharCode (charCode);
7373 }
7474 return password;
You can’t perform that action at this time.
0 commit comments