You are making a text encryptor. It should take multiple words and output a combined version, where each word is separated by a | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

You are making a text encryptor. It should take multiple words and output a combined version, where each word is separated by a

Using JavaScript

10th Jul 2022, 2:13 PM
Samuel Michael Ayodeji
Samuel Michael Ayodeji - avatar
9 ответов
+ 3
Please tag "Javascript", not "words". What have you tried so far? Please show your code attempt. If you can't come up with an attempt, read the previous lesson again.
10th Jul 2022, 2:19 PM
Lisa
Lisa - avatar
+ 1
Google - btoa atob in Javascript And you will get the answer
10th Jul 2022, 2:32 PM
Arnav Gumber
Arnav Gumber - avatar
+ 1
Use btoa atob method which uses base64 encryption Just google btoa atob in js
10th Jul 2022, 4:20 PM
Arnav Gumber
Arnav Gumber - avatar
+ 1
Code Infinite with Arnav The code refers to a task in the sololearn Javascript course. Samuel Michael Ayodeji Please read the previous lesson again: You need to make a new ⭐method⭐ for the Add class – not a function. Also please check the spelling, it is "var", not "Var" and so forth. In the else-part a "+" is missing.
10th Jul 2022, 4:48 PM
Lisa
Lisa - avatar
0
class Add { constructor(...words) { this.words = words; } //your code goes here Print(){ Var y =""; For(x of this.words){ if(x ==","){ x = ""; } else{ y + ="
quot;var+x; } } y =y+"
quot;; console.log(y); } } 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 Jul 2022, 2:37 PM
Samuel Michael Ayodeji
Samuel Michael Ayodeji - avatar
0
Which line of the code will I place the JavaScript answer.
10th Jul 2022, 3:20 PM
Samuel Michael Ayodeji
Samuel Michael Ayodeji - avatar
0
I understand, Thanks for the heads up .
10th Jul 2022, 10:26 PM
Samuel Michael Ayodeji
Samuel Michael Ayodeji - avatar
0
class Add { constructor(...words) { this.words = words; } //your code goes here print() { const t = '
#x27; + this.words + '
#x27;; console.log(t) } } 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();
31st Jul 2022, 6:45 PM
STEPHEN OKPALA
STEPHEN OKPALA - avatar
0
I finally solved it here below class Add { constructor(...words) { this.words = words; } //your code goes here print() { const t = '
#x27; + this.words.join('
#x27;) + '
#x27;; console.log(t); } } 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();
31st Jul 2022, 7:12 PM
STEPHEN OKPALA
STEPHEN OKPALA - avatar