My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Lucy

4 likes

·

110 reads

3 comments

Anqa Akram
Anqa Akram
Feb 5, 2023

Heyaaa Kittyy, imma abit late to the challenge party but I followed your advice of trying myself before looking up the solution. And lo and behold I did it! Thank you for challenging us :)) here was my solution (save for the 0 check for space) :

cipheredText = "54686973007761730061007265616c6c7900746f756768006368616c6c656e676500666f72006d65210042757400490064696400697421";

textLen = cipheredText.length;

RealText = "";

for (i=0; i<textLen;i+=2) {

RealText = RealText.concat(String.fromCharCode((parseInt(cipheredText[i]+cipheredText[i+1],16))));

}

console.log(RealText);

1
·
·2 replies
Lucy
Lucy
Author
·Feb 5, 2023

You basically did that whole thing in one line! Yay you!! Thank you so much for giving it a go!

1
·
Anqa Akram
Anqa Akram
Feb 5, 2023

Lucy hehe yup! I think I not only challenged myself to solve it but to also solved it with the smallest lines of code lol XD

2
·