Extend the Vowels

Published by Werdna in

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

Examples

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

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

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

Notes

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

Watch a quick demo on how Edabit works.