You can see great code examples of Javascript in mainstream libraries like jQuery. I've learned a lot just reading it's source code. There's nothing better than reading sources that are working in millions of websites and are concerned about best practices.