Capitalize the Last Letter

Published by Werdna in

Create a function that capitalizes the last letter of every word.

Examples

capLast("hello") ➞ "hellO"

capLast("My Name Is Edabit") ➞ "MY NamE IS EdabiT"

capLast("HELp THe LASt LETTERs CAPITALISe") ➞ "HELP THE LAST LETTERS CAPITALISE"

Notes

There won't be any cases of punctuation in the tests.

Watch a quick demo on how Edabit works.