Reverse String Without Affecting Special Characters

Published by Mubashir Hassan in

Reverse the string without affecting special characters and numbers.

Examples

revSpecstring("AFC#47GH$Ieu") ➞ "ueI#47HG$CFA"

revSpecstring("guyhiuj1234!@#$%rtyhghu") ➞ "uhghytr1234!@#$%juihyug"

revSpecstring("12!@" ) ➞ "12!@"

Notes

Try with for loops.

Watch a quick demo on how Edabit works.