Class
class Add { constructor(...words) { this.words = words; } print() { console.log(`${this.words}
); } } 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(); This code must output like that: $hehe$hoho$haha$hihi$huhu$ $this$is$awesome$ $lorem$ipsum$dolor$sit$amet$consectetur$adipiscing$elit$ But it is not outputting: $hehe,hoho,haha,hihi,huhu$ $this,is,awesome, $lorem,ipsum,dolor,sit,amet,consectetur,adipiscing,elit$ Please, Could you solve the problem?