5js
2021-01-15 17:12
标签:bsp nbsp class object rip pre console UNC log 对象 5js 标签:bsp nbsp class object rip pre console UNC log 原文地址:https://www.cnblogs.com/gao-chao/p/13393200.htmlvar obj2 = new object();
obj2.name = ‘拼多多‘
obj2.sayHi = function {
console.log(‘Hi~~‘)
}
function Star(uname,age,sex) {
this.name = uname;
this.age = age;
this.sex = sex;
this.sing = function(song) {
console.log(song)
}
}
var ldh = new Star(‘刘德华‘,23,‘男‘)
console.log(typeof(ldh))
ldh.sing(‘是理想‘)
for (var k in ldh) {
console.log(k);
console.log(ldh[k])
}
上一篇:纯css写网格
下一篇:php抽象类和接口的区别