0

Code Cleanup for Js Words project

I completed the JS course with the Words project, it was a though battle but at the end I came up with this code: I would like to have some feedbacks to know if the code is viable, or if it could be better. Thank you! //Code start here class Add { constructor(...words) { this.words = words; } //your code goes here get print(){ return this.encryption; } encryption(){ console.log('

#x27;+ this.words.join("
quot;)+'
#x27;); } } 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 Jan 2023, 5:27 PM
Filippo Cossu
Filippo Cossu - avatar
0 Respuestas