Function 2: Move Capital Letters
Create a JavaScript arrow function that meets the following requirements:
- Authored using arrow expression syntax (constant name_moveCapitalLetters)
- Takes in a string parameter, of mixed casing (mix of upper and lowercase letters)
- The function moves all capital letters to the front of a word. The uppercase letters moved to the front maintain their original relative order. The lowercase letters moved to the back maintain their original relative order.
- Console log output is NOT permitted.
- The function should pass each of the illustrated examples below at a minimum.
moveCapitalLetters(hApPy)
moveCapitalLetters("moveMENT")
moveCapitalLetters(shOrtCAKE*)
*APhpy "MENTmOVe 7 "OCAKEshrt