I need to get all the cookies stored in my browser using JavaScript. How can it be done?
You cannot. By design, for security purpose, you can access only the cookies set by your site. StackOverflow can't see the cookies set by UserVoice nor those set by Amazon.