regexVar

HackerRank day2

by trentHarlem

JavaScript

function regexVar() {
  /*
   * Declare a RegExp object variable named 're'
   * It must match a string that starts and ends with the same vowel (i.e., {a, e, i, o, u})
   */
  const re = /^([aeiou]).*\1$/i;
  /*
   * Do not remove the return statement
   */
  return re;
}

//const regexVarrow = () => /^([aeiou]).*\1$/i