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.






                //物件建構式:建構「biker」物件種類,指派 name、nationality、team、BikeNo 這4個參數為屬性
function biker(name,nationality,team,BikeNo){ = name;
  this.nationality = nationality; = team;
  this.BikeNo = BikeNo;
//創建「biker」類型的新物件 b1、b2,並且依照上面物件建構式的順序分配值給屬性
var b1 = new biker("Valention Rossi","Italy","Monster Energy Yamaha MotoGP","46");
var b2 = new biker("Marc Márquez","Spanish","Rㄇepsol Honda Team","93");
//顯示物件 b1 「name」的屬性值、空格與 b1 「BikeNo」的屬性值
document.write(" "+b1.BikeNo);
//顯示字串「 VS. 」
document.write(" VS. ");
//顯示物件 b2 「name」的屬性值、空格與 b2 「BikeNo」的屬性值
document.write(" "+b2.BikeNo);