<script type= "Text/javascript" >
function Letterchanges (str) {
Str=str.split ("");//Convert a string into an array
for (i=0;i<str.length;i++) {
Str[i]=str[i].charcodeat ();//convert the characters in the array into ASCLL yards
if (str[i]>64&&str[i]<122) {//By ASCLL code to determine the type of character, with branch structure to classify its processing
if (str[i]==100| | str[i]==104| | str[i]==110| | str[i]==116) {//This is a vowel letter and needs to be capitalized
Str[i]=string.fromcharcode (STR[I]-31);
}
else if (str[i]>96| | STR[I]<90) {//These are not vowels, nor punctuation, add their ascll to 1
Str[i]=string.fromcharcode (str[i]+1);
}
else if (str[i]==90) {//z becomes a
Str[i]= "A";
}
else{
Str[i]=string.fromcharcode (Str[i]);//These are punctuation marks, no change.
}
}
else{
if (str[i]==122) {//z becomes a
Str[i]= "a"
}
else{
Str[i]=string.fromcharcode (Str[i]);//These are all punctuation, maybe punctuation is not appropriate, anyway they are not letters
}
}
}
Str=str.join ("");//change the processed array back to string
return str;
}
var ceshi=letterchanges ("zz{aa[\" ment goes Here ");//Take Boundary value test
document.write (Ceshi);
</script>
JS implements string processing, as follows: The letter becomes the adjacent letter, the punctuation is unchanged, the result if the vowel letter is uppercase, Z becomes a.