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.


My solution to this guys challenge (question 5):

It's more cute than elegant, surely nowhere near optimal (takes some 5-600 ms on my machine).  I iterate a base3 number and use that to pick out the permutations and eval brute force style.  Even though there isn't a lot of code, it took me well over an hour.  My take on this?  If you've never thought of such a problem (or a similar one), it can take you more than an hour, particularly during an interview. There are simply too many directions when it comes to programming to judge a candidate based on one type of problem (think shader guys vs database geeks).

Some better solutions and discussion here :

ps. I can't believe how involved people get in this stuff. Look at this :



body {
  margin: 0px;
  padding: 0px;
  width: 100%;
  height: 100%;
  background-color: #1d1f20;
  color: #ffa500;
  font-weight : bold;
  line-height: 140%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;


                var numbers = "123456789".split(""),
		options = ["", "+","-"],
    i, base3, test, merged;

for(i=0; base3!="22222222"; i++){
  base3 = i.toString( 3 );
  test = ("00000000").substr(0, 8 - base3.length) + base3;
  merged = "";
  numbers.forEach(function(element, index){
    merged += ( element + (options[ test.charAt(index) ] || ""));
  if(eval(merged) == 100){
  	document.body.innerHTML += (merged + " = 100<br>");