Ask Ben: Javascript String Replace Method

function RandomString(){
	// Create an array of letters.
	var arrLetters = ["A","B","C","D","E","V","W","X","Y","Z"];
	 
	// Use the random() method and the modulus (%) operator to
	// pick a random letter from the above array.
	var intLetter = (Math.floor( Math.random() * 10 ) % 9);
	 
	// Return the random letter string we get from the 
	// array of letters above.
	return( "[" + arrLetters[ intLetter ] + "]" );
}

For Cut-and-Paste