Fill in the blanks to output "Rex barks." class Dog { constructor(name) { .name = name; } bark() { console. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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

3rd Sep 2019, 6:54 PM
stefaan verhelst
stefaan verhelst - avatar
7 Answers
+ 10
class Dog{ constructor (name){ this.name=name; } bark(){ console.log(this.name+ " barks"); } let myDog = new Dog("Rex"); myDog.bark();
3rd Sep 2019, 7:40 PM
Kevin ★
+ 5
class Dog { constructor(name) { this.name = name; } bark() { console.log(this.name + ' barks.'); } } let d = new Dog('Rex'); d.bark();
3rd Oct 2019, 2:46 PM
Zenande Zilwa
Zenande Zilwa - avatar
+ 2
This name bark
25th Jul 2020, 4:11 PM
Ekundayo Timileyin
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();
11th Jun 2020, 8:00 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
0
constructor(name) { this .name = name; } bark() { console.log(this. name + ' barks.'); } } let d = new Dog('Rex'); d. bark ();
3rd Dec 2020, 7:42 PM
El Maslohi Hassan
0
class Dog { constructor(name) { this .name = name; } bark() { console.log(this. name + ' barks.'); } } let d = new Dog('Rex'); d. bark ();
10th Aug 2021, 9:23 AM
Owethu Sotomela
Owethu Sotomela - avatar
0
class Dog { constructor(name) { this.name = name; } bark() { console.log(this.name + ' barks.'); } } let d = new Dog('Rex'); d.bark();
17th Sep 2022, 9:34 AM
Frank Osei Afful