Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


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


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.


Save Automatically?

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.






                // modifiers for skin tones on the Fitzpatrick scale
const modifiers = [
  '\u{1f3fb}', // skin type 1-2
  '\u{1f3fc}', // skin type 3
  '\u{1f3fd}', // skin type 4
  '\u{1f3fe}', // skin type 5
  '\u{1f3ff}', // skin type 6

// baby emoji with fitzpatrick skin tone 4
const baby_4 = 'πŸ‘ΆπŸ½';

// replaces any skin tone modifiers with the given modifier
// if no modifier is provided, existing modifiers are removed
function replaceModifier (emoji, modifier) {
  let ret = emoji;
  for(let i = 0; i < modifiers.length; i++) {
    ret = `${ret}`.split(modifiers[i]).join(modifier || '');
  return ret;

const baby = replaceModifier(baby_4, '');
// πŸ‘Ά


// change modifiers
for(let i = 0; i < modifiers.length; i++) {
  console.log(replaceModifier(baby_4, modifiers[i]));
// πŸ‘ΆπŸ»
// πŸ‘ΆπŸΌ
// πŸ‘ΆπŸ½
// πŸ‘ΆπŸΎ
// πŸ‘ΆπŸΏ

// add skin tone modifier to emoji with no skin tone
// supports ZWJ sequences
function addModifier(emoji, baseEmoji, modifier) {
  return emoji.split(baseEmoji).join(baseEmoji + modifier);

const peopleHoldingHands = 'πŸ§‘β€πŸ€β€πŸ§‘';
// πŸ§‘β€πŸ€β€πŸ§‘
const person = 'πŸ§‘';

// add modifiers
for(let i = 0; i < modifiers.length; i++) {
  console.log(addModifier(peopleHoldingHands, person, modifiers[i]));
// πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸ»
// πŸ§‘πŸΌβ€πŸ€β€πŸ§‘πŸΌ
// πŸ§‘πŸ½β€πŸ€β€πŸ§‘πŸ½
// πŸ§‘πŸΎβ€πŸ€β€πŸ§‘πŸΎ
// πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸΏ