In today's challenge, we ask that you to write a function that returns a string in which an individual's first name is swapped with their last name.
Example: nameShuffler('Emma McClane'); => "McClane Emma"
Good luck!
This challenge comes from debri on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge for a future post? Email yo+challenge@dev.to with your suggestions!
Latest comments (25)
JavaScript:
Here is the simple solution with Python:
My solution in js
Seems pretty simple (Haskell)
Python :
Buffer goes buf-buf
Nice and simple python implementation π
There is my python solution
Rust Playground