Trouble in following the documentation order and example javascript

First Step - Update example javascript

Authentication and authorization
Update:

In this case, the first steps of the flow are the same. However, when the user grants the permissions to your application he will be redirected to the url as specified when you registered your application with an access_code parameter. 
to:
In this case when the user grants the permissions to your application he will be redirected to the url as specified when you registered your application with an access_code parameter. 

and

http://your_url?access_code=...
to
http://your_url?code=...