0

Trying to solve the final project in Javascript

Hi there I want to solve the final project in Javascript but it doesn't work. My code: class Add { constructor(...words) { this.words = words; } //your code goes here } print(){ var y = ""; for (x of this.words){ if(x = ","){ x = ""; } else { y += "

quot; + x; } y = y + "
quot;; console.long(y); } } var x = new Add("hehe", "hoho", "haha", "hihi", "huhu"); var y = new Add("this", "is", "awesome"); var z = new Add("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"); x.print(); y.print(); z.print();

15th Jul 2021, 6:47 PM
Talal Emran
Talal Emran - avatar
2 Antworten
15th Jul 2021, 7:43 PM
JaScript
JaScript - avatar
0
Thank you, but it didn't work!
16th Jul 2021, 5:11 AM
Talal Emran
Talal Emran - avatar