Decrypt a string encrypted by repeating i | Function to return the decrypted string ; Initial jump will be 1 ; Increment jump by 1 with every character ; Driver code
function decryptString ( str , n ) { let i = 0 , jump = 1 ; let decryptedStr = " " ; while ( i < n ) { decryptedStr += str [ i ] ; i += jump ; jump ++ ; } return decryptedStr ; } let str = " " ; let n = str . length ; document . write ( decryptString ( str , n ) ) ;