Speed Typing Test
In this assignment, let's build a Speed Typing Test by applying the concepts we learned till now.
Refer to the below image.
Instructions:
- Add HTML container element with id speedTypingTest
- Add HTML paragraph elements with id timer,quoteDisplayandresult
- Add HTML textarea element with id quoteInput
- Add HTML button elements with id submitBtnandresetBtn
- Add the Bootstrap component spinner
By following the above instructions, achieve the given functionality.
- When the page is opened
- Make a HTTP request to get a random quotation
- URL: https://apis.ccbp.in/random-quote
- URL:
- Display the random quotation in the HTML paragraph element with id quoteDisplay
- Start the timer and display the time in seconds in the HTML paragraph element with id timer
- Make a HTTP request to get a random quotation
- When a value is entered in the HTML textarea element with id quoteInputand the HTML button element with idsubmitBtnis clicked
- If the value entered in the HTML textarea element with id quoteInputis same as the quotation in the HTML paragraph element with idquoteDisplay
- The timer should be stopped and a success message should be shown in the HTML paragraph element with id result
- The timer should be stopped and a success message should be shown in the HTML paragraph element with id
- If the value entered in the HTML textarea element with id quoteInputdoes not match the quotation in the HTML paragraph element with idquoteDisplay
- The timer should be running and an error message should be shown in the HTML paragraph element with id result
- The timer should be running and an error message should be shown in the HTML paragraph element with id
- If the value entered in the HTML textarea element with id
- When the HTML button with id resetBtnis clicked
- Make a HTTP request to get a new random quotation
- Display the new random quotation in the HTML paragraph element with id quoteDisplay
- Reset the timer to 0seconds and display the time in seconds in the HTML paragraph element with idtimer
- Empty the HTML textarea element with id quoteInput
- Add loadingstatus with Bootstrap componentspinnerwhile making an HTTP request.
Resources
Clock Image:
CSS Colors Used:
Background Color Hex Codes Used:
#690cb0
#dac0ff
#f3eaff
#f2ebfe
#ffffff
Border Color Hex Codes Used:
#9aa5b1
Text Color Hex Codes Used:
#690cb0
#3e4c59
#ffffff
#323f4b
Tags:
JavaScript Practice