0
Help for the last ejercise of the course of javascript
This is mi code and I don't understand why this do not work? Please help: class Add { constructor(...words) { this.words = words; } //tu cĂłdigo va aquĂ print(){ var p=""; for (let i=0;i<this.words.length ;i++){ p = p + "
quot; + this.words[i]; } let r=p+"quot;; console.log(r); /*var l = new Array (); for (let i in this.words) { l.push("quot;+this.words[i]); } let m = (l.join('')); let n = m+"quot;; console.log(n);*/ } } 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();2 Answers
+ 1
Many people are having this problem.
See my post for the explanation.
https://www.sololearn.com/post/838036/?ref=app
0
Yes, thanks for your help, I could complete the challenge đđđ