Sobes.tech
Middle+

Determine whether the string is a 'pangram' — a string containing every letter of the alphabet at least once.

sobes.tech AI

Answer from AI

To determine if a string is a pangram, you need to check that it contains all the letters of the alphabet at least once. For the Russian alphabet, this is 33 letters.

Example in JavaScript:

function isPangram(str) {
  const alphabet = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя';
  const lowerStr = str.toLowerCase();

  for (const char of alphabet) {
    if (!lowerStr.includes(char)) {
      return false;
    }
  }
  return true;
}

// Usage example
console.log(isPangram('Съешь же ещё этих мягких французских булок, да выпей чаю')); // true
Determine whether the string is a 'pangram' — a… - sobes.tech