Hello, I am a student and got this task as homework. Can someone solve it and explain how to do it?
TASK:
Use this example as a template:
Customize HTML and JavaScript as follows:
Create three “p” elements with IDs “start”, “counter”, and “end” (“demo” is no longer needed).
Assign the date and the current time to the “p” element with the ID “start” as content (before the content of “counter” is generated).
Assign the numbers 1 to 2’000 as content to the “p” element with the ID “counter”, where each number is displayed on a new line.
Assign the date and the current time to the “p” element with the ID “end” as content (after the content of “counter” is generated).
How long did it take to generate the 2’000 numbers? This depends on the concrete implementation in the script.