Š“Š¾ŃŠæŠ¾Š“Š°, Š²Š¾ŠæрŠ¾Ń ŠæŠ¾ Š·Š°Š“Š°Š½Šøю Ā«ŃŠ»Š¾Š²Š°Ā» Š² JS | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Š“Š¾ŃŠæŠ¾Š“Š°, Š²Š¾ŠæрŠ¾Ń ŠæŠ¾ Š·Š°Š“Š°Š½Šøю Ā«ŃŠ»Š¾Š²Š°Ā» Š² JS

Š”Š¾Š±ŃŃ‚Š²ŠµŠ½Š½Š¾, ŠŗŠ¾Š“ 100% рŠ°Š±Š¾Ń‡ŠøŠ¹, Š²Ń‹Š²Š¾Š“ Š²ŠµŃ€Š½Ń‹Š¹, Š½Š¾ ŠæŠ¾Ń‡ŠµŠ¼Ńƒ-тŠ¾ Š½Šµ ŠæрŠ¾Ń…Š¾Š“Šøт ŠæрŠ¾Š²ŠµŃ€Šŗу ŠæрŠøŠ»Š¾Š¶ŠµŠ½ŠøŠµŠ¼. ŠŸŠ¾ŠæрŠ¾Š±Š¾Š²Š°Š» уŠ¶Šµ с 10Š¾Šŗ чуŠ¶Šøх ŠŗŠ¾Š“Š¾Š², ŠŗŠ¾Ń‚Š¾Ń€Ń‹Šµ, ŠæŠ¾ Š·Š°Š²ŠµŃ€ŠµŠ½ŠøяŠ¼ Š“руŠ³Šøх Š»ŃŽŠ“ŠµŠ¹, ŠæрŠµŠŗрŠ°ŃŠ½Š¾ ŠæрŠ¾Ń…Š¾Š“ŠøŠ»Šø ŠæрŠ¾Š²ŠµŃ€Šŗу, Š½Š¾ у Š¼ŠµŠ½Ń Š½Šø Š¾Š“ŠøŠ½ Š½Šµ ŠæрŠ¾ŃˆŃ‘Š». Š•ŃŃ‚ŃŒ Š²Š¾Š·Š¼Š¾Š¶Š½Š¾ŃŃ‚ŃŒ Š½Š°ŠæŠøсŠ°Ń‚ŃŒ Š² сŠ°ŠæŠæŠ¾Ń€Ń‚?

22nd Dec 2020, 4:10 PM
Kirill Kapytov
Kirill Kapytov - avatar
15 Respostas
+ 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
AjaraGuju
AjaraGuju - 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
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