← Back to challenges

Vowel to Vowel Links

JavaScriptHardregexstringsloopsvalidation

Instructions

Given a sentence as str, return true if any two adjacent words have this property: One word ends with a vowel, while the word immediately after begins with a vowel (a e i o u).

Examples

vowelLinks("a very large appliance") ➞ true

vowelLinks("go to innokodakademija") ➞ true

vowelLinks("an open fire") ➞ false

vowelLinks("a sudden applause") ➞ false

Notes

You can expect sentences in lowercase/uppercase.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.