← Back to challenges

Scottish Screaming

JavaScriptHardstringsformattingregex

Instructions

A strong Scottish accent makes every vowel similar to an "e", so you should replace every vowel with an "e". Additionally, it is being screamed, so it should be in block capitals.

Create a function that takes a string and returns a string.

Examples

toScottishScreaming("hello world") ➞ "HELLE WERLD"

toScottishScreaming("Mr. Fox was very naughty") ➞ "MR. FEX WES VERY NEEGHTY"

toScottishScreaming("Butterflies are beautiful!") ➞ "BETTERFLEES ERE BEEETEFEL!"

Notes

  • Make sure to include all punctuation that is in the original string.
  • You don't need any more namespaces than are already given.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Find the Total Number of Digits the Given Number Has