+ 3

Someone help me with js last project

JavaScript last project https://code.sololearn.com/cOHzvJeWQ8EY/?ref=app

26th Jun 2022, 6:28 PM
Umar Muhammad
Umar Muhammad - avatar
5 odpowiedzi
+ 3
It still wrong
26th Jun 2022, 7:03 PM
Umar Muhammad
Umar Muhammad - avatar
+ 3
print(){ let output; let text = ""; this.words.forEach((words) => { text += '
#x27; + words; output = text + "
quot;; }) return output; Use this approach for your print method
27th Jun 2022, 6:27 AM
JSON🌠
+ 2
Change your last 3 lines of codes to- console.log(x); console.log(y); console.log(z); because print is not used in Javascript, use console.log instead
26th Jun 2022, 6:34 PM
Arnav Gumber
Arnav Gumber - avatar
+ 2
class Add { constructor(...words) { this.words = words; } //your code goes here print = ()=>{ const result = (this.words.map(word => "
quot; + word)).join("") + "
quot;; console.log(result) } } 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"); console.log(x); console.log(y); console.log(z);
26th Jun 2022, 8:56 PM
Arnav Gumber
Arnav Gumber - avatar
0
Thanks you guys
27th Jun 2022, 8:38 AM
Umar Muhammad
Umar Muhammad - avatar