function isValidLang(lang) {
  let array = langs;

  // padEnd is not supported in IE11
  while (lang.length < 3) {
    lang += '`';
  }
  for (let i = 0; i <= lang.length - 1; i++) {
    const index = lang.charCodeAt(i) - 96;
    array = array[index];
    if (!array) {
      return false;
    }
  }

  return true;
}
Determine if a string is a valid language code
@method isValidLang
@memberof axe.utils
@param {String} lang String to test if a valid language code
@returns {Boolean}