+ 2

My JavaScript last Module Project

Js Last Module Project Words is not working...My Code is exact Reasonable to the Given Conditions...Please Help...My Certificate is to be Unlocked.

28th Dec 2020, 4:40 PM
Muhammad Shoaib Fayyaz
Muhammad Shoaib Fayyaz - avatar
1 Resposta
+ 2
class Add { constructor(...words) { this.words = words; } print() { let d = "
quot;; for(let a of this.words) { let arr = [a]; for(let b = 0; b < arr.length; b++) { if(b < arr.length) { d = d + `${arr[b]} } else { return d; } } } console.log(d); } } 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();
28th Dec 2020, 5:16 PM
Muhammad Shoaib Fayyaz
Muhammad Shoaib Fayyaz - avatar