Lorem Ipsum Generator

This was another personal project that I thought would be useful to use at my workplace. I often times find myself needing to use lorem ipsum text on staging site or pages. I saw an example of a Lorem Ipsum generator online and figured I could do that to practice my JavaScript skills. I first created my elements I wanted to work with in HTML. The user will have a simple “select” element that drops down a list of number values they can choose from. This number represents the number of Lorem Ipsum paragraphs that will be displayed to a user. I then moved onto the JS logic. I defined the elements I wanted to work with and then created event listeners that would trigger a function to run once clicked on. The first function grabs the users selected value (number of paragraphs). It then runs a for loop however many times based on the user’s selected value. One instance of running the for loop creates one paragraph of Lorem Ipsum. So if a user selects the value “3” then the for loop will run 3 times and spit out 3 paragraphs of Lorem Ispum. The other 2 functions clear the screen and copy all the paragraphs to the user’s clipboard.

Technologies Used:

HTML, CSS, JavaScript, Git