every with includes

Πανόγραμμα
Πανόγραμμα στη διαδρομή JavaScript
export function isPangram(input) {
  const inputLowered = input.toLowerCase();
  return [...'abcdefghijklmnopqrstuvwxyz'].every((c) =>
    inputLowered.includes(c),
  );
}
  • This begins by lowercasing the input by using the String toLowerCase method.
  • It uses spread syntax to make an Array out of a string of the alphabet.
  • It then checks if all letters in the alphabet are contained in the input, using the Array method every with the String method includes.

If all letters of the alphabet are in the input, then the function returns true.

Translation missing: el.number.nth.ordinalized Sep 2026 · Σου φάνηκε χρήσιμη;