Create a JavaScript Arrow function that meets the following requirements: _missingSpace(string) • Authored using arrow expression syntax (constant name _missingSpace) • The function is passed a string argument • The function inserts a white space between every instance of a lowercase character followed immediately by an uppercase character, and returns the modified string, with whitespaces, back to the caller. • Console log output is NOT permitted. • The function should pass each of the illustrated examples below at a minimum. _missingSpace(“”) → “” _missingSpace(“a”) → “a” _missingSpace(“A”) → “A” _missingSpace(“Ba”) → “Ba” _missingSpace(“aB”) → “a B”
Create a JavaScript Arrow function that meets the following requirements:
_missingSpace(string)
• Authored using arrow expression syntax (constant name _missingSpace)
• The function is passed a string argument
• The function inserts a white space between every instance of a lowercase character followed immediately by an uppercase character, and returns the modified string, with whitespaces, back to the caller.
• Console log output is NOT permitted.
• The function should pass each of the illustrated examples below at a minimum.
_missingSpace(“”) → “”
_missingSpace(“a”) → “a”
_missingSpace(“A”) → “A”
_missingSpace(“Ba”) → “Ba”
_missingSpace(“aB”) → “a B”
_missingSpace(“BaB”) → “Ba B”
_missingSpace(“GeorgeBrownCollege”) → “George Brown College”
_missingSpace(“SheWalksToTheBeach”) → “She Walks To The Beach”
_missingSpace(“TheGreatUpset”) → “The Great Upset”
Step by step
Solved in 2 steps