Include an area for users to enter text
Include a button that a user can click to trigger the analysis of the input text
Include 4 paragraph elements that will be used to display the calculated stats
HTML
This is what the rendered HTML should look like before a user presses the button.
JavaScript
When the button is clicked, do the following:
Assign the value of the text area input to a variable
Loop over the input and keep track of the
total number of words (Hint: How do you know when there is a new word?)
total number of sentences (Hint: How do you know when a sentence ends?)
average words per sentence
total number of spaces
Change the text of the 4 paragraph elements to display these four calculated stats. (Hint: innerHTML)
JavaScript
This is an example of what should show up after the user clicks the button.
Additional
Use of loops, functions, if statements and variables.
Do not use the JavaScript .split() function
Be creative!! Have Fun!!
Looks like a really darn good challenge. It takes several concepts addressed in the algorithm challenges here, but I really like that it says not to use .split() haha. I see people doing algorithm challenges using already made methods, but ideally you should be writing them from scratch completely.
Thanks to all the repliers. I am very new to computer coding. I am coming back to it after several years away from it. I first took computer programming in high school. I started self-learning after high school then went in other directions. It seems I have come back around to it. In my mind this means I was meant to do it, but with lots of hard work.