馬老師分布式流處理服務(wù)—Apache Kafka
2022-10-22 22:38 作者:janet19961217 | 我要投稿
使用原型
function Dog(name) {
?this.name = name;
?this.legsNum = 4;}Dog.prototype.kind = 'dog';Dog.prototype.run = function () {
?console.log("I am running with " + this.legsNum + " legs.")}Dog.prototype.say = function () {
?console.log("Wang Wang, I am " + this.name);}const dog = new Dog("ming");dog.say();
標(biāo)簽: