An example repository for learning setTimeout
and storing state with Local Storage.
- Fork and clone this repository
npm install
npm start
It is suggested you tackle each task in the given order.
- Update the
<script>
tag so that we are able to correctly see the number of seconds. - When you click the Start button, start a timer and increment the clock.
- When you click the Stop button, stop the timer.
- At each interval, save the state to Local Storage.
- When you arrive at the page, load the information to Local Storage.
- When you leave the name field, show the message "Welcome back, {Name}" where name is the name that was entered.
- Store the name in Local Storage and load it back up once you've arrived at the page.