← Back to challenges

Extend the Vowels

JavaScriptHardstringsregex

Instructions

Create a function that takes a word and extends all vowels by a number num.

Examples

extendVowels("Hello", 5) ➞ "Heeeeeelloooooo"

extendVowels("Innokodakademija", 3) ➞ "EEEEdaaaabiiiit"

extendVowels("Extend", 0) ➞ "Extend"

Notes

Return "invalid" if num is not a positive integer or 0.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Check If objOne Is Equal to objTwo