function Dog(name) {
this.name = name;
}
Dog.prototype.numLegs = 4;
// Only change code above this line
let beagle = new Dog("Snoopy");
console.log(beagle.numLegs)
//4
In Javascript instead of declaring and executing a function in two different steps. for example step 1 - function add(a,b){return a+b;} ste...
No comments:
Post a Comment