Write a function named simpleCompression that receives a string made up of letters as a parameter, let's call it text.
The function should "compress" the text parameter according to this algorithm:
If the text is empty, return an empty string.
If text is not empty, then:
text
=Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro