JavaScript: Progress bar

Last update: 25 Jan 23:20
0
Students

src/application.js

Implement and export as default the function that runs the code that fills the <progress> element by one percent in 1 second. After 100 seconds, the process should stop reaching its maximum.

Initial state

<progress value="0" max="100"></progress>

After one second

<progress value="1" max="100"></progress>

To change the value use the setAttribute()

Tips

  • Complete the task using setTimeout() (setInterval() may break the tests)
  • Progress element

For full access to the challenge you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests