📄 construct.js
字号:
// create a car constructor function
function car( maker, model, color)
{
this.maker = maker || "Dodge";
this.model = model || "Viper";
this.color = color || "Silver";
this.startup = startup;
}
// define the startup function
function startup()
{
alert("... the motor is now running!");
}
var viper = new car();
alert( viper.color + " " + viper.maker + " " + viper.model );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -