Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![ammarkhan](https://secure.gravatar.com/avatar/5fccd1a1eedc2b29b5aa87bf2fe5172a?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
ammarkhan
Front End Web Development Techdegree Student 21,661 PointsImagine you work at a video streaming service. You want to keep track of where a user was on a video so if they navigate
In the quiz of callback, there was this question as stated,
Q: Imagine you work at a video streaming service. You want to keep track of where a user was on a video so if they navigated away they could come back and resume where they left off. Which function would you use?
but I couldn't understand how can we track when someone navigate away and come back to play video?
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsYou didn't mention which course, or provide a link to the quiz. So I'm not sure if the relates to the answer, but one way to accomplish this would be with the browser's local storage feature.
There's a workshop available here on Using Local Storage with JavaScript.
![L Haney](https://secure.gravatar.com/avatar/6e8e41f2c2d68242785058b02689dc49?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
L Haney
Front End Web Development Techdegree Student 10,263 PointsThis is from the "Callback Functions in JavaScript" course.
I was confused by this question too, there's no way to know whether you need to use setInterval or setTimeout, based on the information provided. It's too vague.
Hint: The question does want to be able to track a user's playback at a regular interval, not just once.
Steven Parker
230,688 PointsSteven Parker
230,688 PointsPrompted by L Haney's recent post, I revisited this old question and found the reference in this quiz.
I think I finally understand the confusion — but the quiz question is only asking which timing function you might use to update a tracking point every second. The local storage would come into play as a way to store the position, and when the user returned to the page to pick up the last saved position for continuing.
So ammarkhan did your original question get answered? You can mark a question solved by choosing a "best answer".
And happy coding!