2 Star 2 Fork 1

王小端coder/ts-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
interface.js 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
王小端coder 提交于 2019-11-07 14:50 . TypeScript示例
var customer = {
firstName: "Tome",
lastName: "Hanks",
sayHi: function () {
return "Hi there";
}
};
console.log("Customer");
console.log(customer.firstName);
console.log(customer.lastName);
console.log(customer.sayHi());
var employee = {
firstName: "Jim",
lastName: "Blakes",
sayHi: function () {
return "Hello!";
}
};
console.log("employee");
console.log(employee.firstName);
console.log(employee.lastName);
console.log(employee.sayHi());
var options = {
program: "test1",
conmmandline: "Hello"
};
console.log(options.conmmandline);
options = {
program: "test2",
conmmandline: ["Hello", "World"]
};
console.log(options.conmmandline[0]);
console.log(options.conmmandline[1]);
options = {
program: "test3",
conmmandline: function () {
return "**Hello World**";
}
};
var fn = options.conmmandline;
console.log(fn());
var drummer = {};
drummer.age = 27;
drummer.instrument = "Drums";
console.log(drummer.age);
console.log(drummer.instrument);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wsclog/ts-demo.git
git@gitee.com:wsclog/ts-demo.git
wsclog
ts-demo
ts-demo
master

搜索帮助