DEV Community

Madalina Pastiu
Madalina Pastiu

Posted on

Isograms

Instructions:
An isogram is a word that has no repeating letters, consecutive or non-consecutive. Implement a function that determines whether a string that contains only letters is an isogram. Assume the empty string is an isogram. Ignore letter case.

Example: (Input --> Output)

"Dermatoglyphics" --> true
"aba" --> false
"moOse" --> false (ignore letter case)

Thoughts:

  1. Converting the string to lowercase to ensure case insensitivity.
  2. Using nested loops to compare each character with every subsequent character.
  3. Returning false immediately if a duplicate character is found.
  4. Returning true if no duplicates exist after checking all characters. Solution

Test
This is a CodeWars Challenge of 7kyu Rank (https://www.codewars.com/kata/54ba84be607a92aa900000f1/solutions/javascript)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • --last-failed: Zero in on just the tests that failed in your previous run
  • --only-changed: Test only the spec files you've modified in git
  • --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Practical examples included!

Watch Video 📹ī¸

Top comments (0)

👋 Kindness is contagious

Please leave a ❤ī¸ or a friendly comment on this post if you found it helpful!

Okay