--- title: Uppercase to the Front, Lowercase to the Back tags: challenge-zone --- <style> .center{ text-align: center; } .blue { color: #51c1e9; } .blue-underline { color: #51c1e9; text-decoration: underline; } .sub-t { color: #FF0000; font-size: 22px; } .header { font-size: 28px; } .sub-header { font-size: 29px; } .important { color: #E80D20; } .big { font-size: 38px; font-weight: bolder; } .green { color: #39a928; font-weight: bold; } .red { color: #db2b3d; font-weight: bold; } .small { font-size: 12px; } .head { font-weight: bold; font-size: 25px; } </style> <p class="blue big center">Uppercase to the Front, Lowercase to the Back</p> <hr> :::warning If you're viewing this on the Challenge Zone website, you can click [here](https://hackmd.io/@ASC/ASCCZorganizedString) to open the challenge in a new tab. ::: ### <p class="head">Scanerio</p> In the land of Captial, all sentences are written in an unorthox way where capitalized letters have priority over lowercase letters. Due to this, all essays, poems, articles, books and other written texts are published with all capital letters in a word or sentence placed at the beginning of the text. ### <p class="head">Task</p> Your task is to create a function `organizedString` which accepts a `String` argument and moves all capital letters to the front of the string while maintaining the original order of letters. --- ### `organizedString` The `organizedString` function should only accept a `String` argument and is expected to return a `String` containing the newly organized string. --- ### <p class="head">Sample Results</p> ```javascript= organizedString("mOvEMenT") // --> OEMTmven organizedString("fortKNOX") // --> KNOXfort organizedString("uniTEDSTAtes") // --> TEDSTAunites organizedString("") // --> "" (Empty String) organizedString("HELLOworld") // HELLOworld (No change necessary) organizedString("harry WAShisnam E") // WASEharryhisnam ``` --- ### Explanation In the first example, the uppercase letters from the `String` 'mOvEMent' are 'OEMT'. These letters will now be reorganized and placed at the front of our string while maintaining the original sequence of letters, followed by the lowercase letters 'mven', which maintains the original sequence of letters. --- Your function should work for any `String` argument. DO NOT HARDCODE!