Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
              
            
!

CSS

              
                
              
            
!

JS

              
                
if (isPangram("The quick brown fox jumps over the lazy dog")) {
    console.log("This is a pangram");
} else {
    console.log("This is not a pangram");
}


// ChatGPT
// Function that checks if the provided sentence is Pangram or not
function isPangram(sentence) {
  // Convert the sentence to lowercase and remove any punctuation
  let str = sentence.toLowerCase().replace(/[^a-z]/g, "");

  // Create an array of all unique characters
  let uniqueChars = [...new Set(str)];

  // Check if the number of unique characters is 26 (the number of letters in the alphabet)
  return uniqueChars.length === 26 ? true : false;
}



// ChatGPT
// Using FOR loops
function isPangram_2(sentence) {
    // Create an empty object to store the letter's frequency
    var letterFrequency = {};
    // loop through each character of the sentence
    for (var i = 0; i < sentence.length; i++) {
        // convert the current character to lowercase
        var letter = sentence[i].toLowerCase();
        // check if the current character is a letter
        if (letter.match(/[a-z]/i)) {
            // if the current character is already in the object, increment the count
            if (letterFrequency[letter]) {
                letterFrequency[letter]++;
            } else {
                // if not, add the current character to the object with a count of 1
                letterFrequency[letter] = 1;
            }
        }
    }
    // check if all the letters of the alphabet are in the object
    for (var i = 'a'.charCodeAt(); i <= 'z'.charCodeAt(); i++) {
        if (!letterFrequency[String.fromCharCode(i)]) {
            return false; // if any letter is missing, return false
        }
    }
    return true; // if all the letters are in the object, return true
}

              
            
!
999px

Console