Pen Settings



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


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.


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.


<ul class="outlet"></ul>



body {
	padding: 30px;



const apes = ['Orangutans', 'Gorilla', 'Chimpanzees', 'Humans'];

// classic foreach method with anonymous function
apes.forEach( function(ape) {
	return console.log('1', ape);

// you can leave off the parenthesis if there's only one argument
apes.forEach( ape => console.log('2', ape) );

// you can have a space betweeh the () => 
apes.forEach( (ape) => console.log('3', ape) );

// you can have no space betweeh the ()=> 
apes.forEach( (ape, index)=> console.log('4', ape, index) );

// if there's no parameter you need the ( )
apes.forEach( ()=> console.log('5', 'hi') );

// if you open up the code block you lose the implicit return
apes.forEach( (ape)=> {
	return console.log('6', ape);

apes.forEach( ()=> {
	return console.log('7', 'bye');

apes.forEach( (ape, i) => {
	return console.log('8', ape, i);

apes.forEach( ape => {
	return console.log('9', ape);


apes.forEach( ()=> console.log('hi') );

apes.forEach( (ape)=> console.log(ape) );


apes.forEach( ()=> {
	return console.log('hi');

apes.forEach( (ape)=> {
	return console.log(ape);

// and actually... in most cases prefers not to use them at all! 
// unless specifically for scope-specific signalling

His attempt to popularize the convention with the slogan
"Be a dick" - didn't quite catch on


you can't win them all