I fixed the problem!! I think the problem was my poor English and lack of development knowledge....
In this question, I want to make things like breadcrumb(saving all trace user has visited)
anyway I fixed my js code and it works
click next button scene move to next page and push the current scene name to lastScene Array on the other hand click previous button the scene moves to the end of object('scene name') in the lastScene array and then remove last item of array.