Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Working with Basic Data Types Activity

For this assignment, I:

Firstly: Went the lazier route, so I copy and pasted replace functions for all of the capitals, periods, and commas.

Secondly: I created 2 3 indexable arrays, one for storing the item of the highest word, and another to store how many times that same word showed up in the text.

Finally: I made the code go through each word listed in the text, and then made a simple greater than or less than comparison to each of the words in the first array, if it is higher than the third place word, it will simply repalce the word, if it is the second or first place word, the code moves all the needed values down one, and replaces the one needed.