0

Господа, вопрос по заданию «слова» в JS

Собственно, код 100% рабочий, вывод верный, но почему-то не проходит проверку приложением. Попробовал уже с 10ок чужих кодов, которые, по заверениям других людей, прекрасно проходили проверку, но у меня ни один не прошёл. Есть возможность написать в саппорт?

22nd Dec 2020, 4:10 PM
Kirill Kapytov
Kirill Kapytov - avatar
15 ответов
+ 4
Kirill Kapytov , I found something - there is a change in the words. Now the comma ", " is missing from the arguments. It is mentioned in this discussion https://www.sololearn.com/Discuss/2630096/?ref=app
22nd Dec 2020, 5:20 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 3
class Add { constructor(...words) { this.words = words; this.print = function(){ var str = this.words.join("
quot;); var b = "
quot;+str+"
quot;; console.log(b); }; }; }; 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();
10th Oct 2022, 10:08 AM
KATSIARYNA TSIKHANENKA
KATSIARYNA TSIKHANENKA - avatar
+ 2
Kirill Kapytov , your code gives the expected output, although there are some unnecessary lines and it could be shortened. Maybe there is an error in the test - it's locked and it's hard to guess. I tried again my solution which passed the test last week, now it shows wrong. That's why I think something is wrong with the task or the test or both.
22nd Dec 2020, 4:54 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
Kirill Kapytov, you are welcome. Maybe it's a good idea to report it to SoloLearn.
22nd Dec 2020, 4:57 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
Kirill Kapytov , you are welcome 🐱
22nd Dec 2020, 5:24 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
Я вот так сделал class Add { constructor(...words) { this.words = words; for(var i=0;i<=words.length;i=i+2){ words.splice(i, 0, '
#x27;); } console.log(words.join("")); } //ваш код } 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();*/
6th Sep 2021, 4:56 AM
Шаймарданов Марсель
Шаймарданов Марсель - avatar
+ 1
There was a "," symbol in the word list, but it wasn't in the answer, so my answer didn't pass
24th Jun 2022, 8:17 AM
Евгений Молдованов
Евгений Молдованов - avatar
0
Kirill Kapytov , show your code linked to the Playground. That's the only way to get help.
22nd Dec 2020, 4:12 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Kirill Kapytov , link it to the Playground, then it's easier to check.
22nd Dec 2020, 4:15 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
TheWh¡teCat 🇧🇬 what you think abt this?
22nd Dec 2020, 4:38 PM
Kirill Kapytov
Kirill Kapytov - avatar
0
TheWh¡teCat 🇧🇬 you confirmed my thoughts, thanks.
22nd Dec 2020, 4:55 PM
Kirill Kapytov
Kirill Kapytov - avatar
0
TheWh¡teCat 🇧🇬 yea. I think so too.
22nd Dec 2020, 4:58 PM
Kirill Kapytov
Kirill Kapytov - avatar
0
TheWh¡teCat 🇧🇬 you are the God! It works! I delete “,” and it was verified!
22nd Dec 2020, 5:23 PM
Kirill Kapytov
Kirill Kapytov - avatar
0
class Add { constructor(...words) { this.words = words; } print() { var result; result = this.words.join("
quot;); result = "
quot;+result+"
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"); x.print(); y.print(); z.print();
24th Jul 2023, 7:07 PM
SourceMan-01
SourceMan-01 - avatar