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.


More info on:
<br /><br />
<a href="" target="_blank">Daily Dev Tips</a>
<br /><br />
See console for output 🙋


                body {
  font-family: Roboto,"Helvetica Neue",Arial,sans-serif;
  display: grid;
  place-items: center;
  min-height: 100vh;
  text-align: center;
  font-size: 2rem;


                <!-- JavaScript for loop -->'for loop');
for (let i = 0; i < 5; i++) {
  // Execute 5 times
  console.log(`This is loop number ${i}`);
console.groupEnd('for loop');

<!-- For array -->'for array loop');
const foods = ['🍕', '🍗', '🍔', '🌮'];
for (let i = 0; i < foods.length; i++) {
console.groupEnd('for array loop');

<!-- forEach loop -->'foreach');
foods.forEach((item, index) => {
  console.log(`${index}: ${item}`);

<!-- for in -->'for in');
const user = {
  username: 'DailyDevTips',
  firstName: 'Chris',
  favoriteFood: '🍕'

for(let property in user) {
  console.log(`${property}: ${user[property]}`);
console.groupEnd('for in');

<!-- For of -->'for of');
const foods2 = ['🍕', '🍗', '🍔', '🌮'];
for(let value of foods2) {
console.groupEnd('for of');

<!-- while -->'while');
let check = false;
while(!check) {
  console.log('not correct');
  check = true;
console.groupEnd('while');'while count');
let amount = 0;
while(amount < 5) {
  console.log(`amount ${amount}`);
console.groupEnd('while count');

<!-- Do while -->'do while');
let test = true;
do {
  test = false;
} while(test);
console.groupEnd('do while');'do while false');
let test2 = false;
do {
  test2 = false;
} while(test2);
console.groupEnd('do while false');