Today, we're going to create a computer program that demonstrates metanymic substitution. We'll use JavaScript and HTML to do this. The word we will be using as our primary word is IT. We will define five possible substitutions. The program will randomly select a fragment of the primary word. So, first, create an HTML and JavaScript program that displays the word "IT" on the screen. Define a button that will allow the user to run the metonymic substitutor. When the user clicks the button, the program will select one of five substitutions: 1. ((IT)) 2. (I(T)) 3. (I)(T) 4. ( IT ) 5. ()IT() The program will swap out the randomly selected segment of the primary word with a randomly selected substitution, then update the page to show the new word.
It will make this code:
No comments:
Post a Comment