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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


                Nothing here... please open your browser console ;)





                /*** Welcome ***/

console.log("%c🍓 Welcome to my Console! 🍓", "color: #f4675d; font-size: 30px; border: 3px solid #52a776; border-radius: 5px; padding: 20px; margin: 80px 20px;");

/*** Objects ***/

const fruits  = {'name': 'Strawberry', 'color': 'red', 'size': 'small', 'image': '🍓'};
const veggies = {'name': 'Broccoli', 'color': 'green', 'size': 'medium', 'image': '🥦'};"___ Logging the Objects ___");

// 1. straightforward output

// 2. Frustrating output
console.log('fruits are: ' + fruits);     // :(

// 3. Using the %o string substitution for objects, it's way better!
console.log('veggies are: %o', veggies);  // :)

// 4. Returning multiple objects at once
console.log({ fruits, veggies });

// 5. log() vs info() to display objects in strings
console.log("Shopping list: " + fruits + " and " + veggies);  // :("Shopping list: ", fruits, " and ", veggies);    // :)

// 6. Returning object attributes with template literals
console.log(`Shopping list short version: \n- ${} \n- ${}`);


/*** Colors ***/"___ Adding colors ___");

// 7. Adding colors
console.log('%c Important debug', 'color: red; font-weight: bold;');

// 8. Using colors, string substitution and template literals
const step = 1;
const success = true;
const msg = (success) ? 'success' : 'error';
const msgColor = (success) ? 'green' : 'red';
console.log('%c Debug %c - Step %i: %c%s', 'background: FireBrick; color: white; font-weight: bold', 'font-weight: bold', step, `color: ${msgColor}`, msg);


/***  Table  ***/"___ Table ___");

// 9. Displaying objects in a table (same attributes)
console.table([fruits, veggies]);

// 10. Displaying objects in a table (different attributes)
const meat = {'name': 'Chicken', 'weight': '2kg'};
console.table([fruits, veggies, meat]);