I'm not sure coding Javascript means using any libraries. But then, I'm probably nowhere near Ninja status. Most of the JS I've done has been with zero libraries. My work is usually small scale, however, such as a bit of script to deal with repetitive web page features, a minimal amount of button handling, or some 2D graphics or WebGL doodad.
I've been lucky in that browser compatibility hasn't been an issue - I work mostly with scientists on Linux, Firefox or Chrome only. (All those web devs/designer complaining about IE6 - I never set foot in those waters!) Where browser compat is important, I peek in query.js,
angular, whatever, and steal the essential working bit, after understanding what it does.
Like Bear says, it's all about solid understanding of fundamentals. That's how I go about learning and using anything.
What's even more educational, is to write my own libraries. At some point, I realize I'm, how to put it... not exactly a Ninja. So I switch to the professional open source library, but with a profound understanding of the magic under the hood and why it is the way it is.