- 2
Fill in the blanks to output "Rex barks." class Dog { constructor(name) { .name = name; } bark() { console.
i dont get this ecma6 js no prop html no prob css no prob php no prob i'am stuck from here on
7 Antworten
+ 10
class Dog{
constructor (name){
this.name=name;
}
bark(){
console.log(this.name+ " barks");
}
let myDog = new Dog("Rex");
myDog.bark();
+ 5
class Dog {
constructor(name) {
this.name = name;
}
bark() {
console.log(this.name + ' barks.');
}
}
let d = new Dog('Rex');
d.bark();
+ 2
This
name
bark
0
Fill in the blanks to output "Rex barks."
ANSWER:-
class Dog{ constructor (name){ this.name=name; } bark(){ console.log(this.name+ " barks"); } let myDog = new Dog("Rex"); myDog.bark();
0
constructor(name) {
this
.name = name;
}
bark() {
console.log(this.
name
+ ' barks.');
}
}
let d = new Dog('Rex');
d.
bark
();
0
class Dog {
constructor(name) {
this
.name = name;
}
bark() {
console.log(this.
name
+ ' barks.');
}
}
let d = new Dog('Rex');
d.
bark
();
0
class Dog {
constructor(name) {
this.name = name;
}
bark() {
console.log(this.name + ' barks.');
}
}
let d = new Dog('Rex');
d.bark();