Question: The robot.html page (provided in the Google Drive), features a robot that can be given 3 simple tasks. You need to implement those 3 simple
The robot.html page (provided in the Google Drive), features a robot that can be given 3 simple tasks. You need to implement those 3 simple tasks based on what the user inputs. All outputs need to be structured as a ul element with li elements as its children.
The first is Count Vowels. The user can type a sentence into the input area then click the Count Vowels buttons. The robot will then output an unordered list in the black box area below the buttons with each vowel that appeared in the sentence and how many occurrences it found, even if it is zero. The robot will ignore all punctuation and will also not consider y a vowel. A screenshot example is below.
The second is Count Words. The user can type a sentence into the input area and click the Count Words button. The robot will then output a list of words and have many times they are used. The robot ignores punctuation and capitalization when comparing words.
The third, and final, is Count Punctuation. The user can type two words into the input area and click the Count Punctuation button. The robot will then count the following punctuation: exclamation mark, semicolon, comma, period, question mark, colon, apostrophe, double-quote, hyphen. The robot then displays the count of the punctuation used, and will not list any that are zero.
Restrictions:
You use any third party JavaScript libraries
You dont enable JavaScripts strict mode
You use var instead of let
You dont use the EventListener API
You dont create DOM elements via JavaScript or the DOM API (ie dont set innerHTML or innerText with Strings)
If the page doesnt render and work properly with the latest Google Chrome
If any errors or console logs appear in the browsers web developer console
The output is not a ul element with li elements
Your code does not pass https://eslint.org/demo with no issues. (In the Rules Configuration, make sure tick the browser and es6 boxes, as well as setting ECMA Version to 6)
JavaScript.
In case needed, this is robot.html referred to in the first line.
Homework 2: Smart Robot Hello! I'm a smart robot. I can do many interesting things. Type something below and click a button to watch me work!Count Vowels Count Words Count Punctuation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
