I equate JavaScript with trying to learn a new language: I don’t understand it a lot of the time, but the more I practice the better I’ll get. I seem to be at a place right now, where all the individual pieces sort of make sense, but I can’t quite put them all together in any sort of logical manner. It’s sort of the equivalent of baby talk, hopefully by the end of the semester I’ll be up to speaking in complete sentences.
Contrary to popular misconception, Java and JavaScript are not the same thing. Java is a programming language that creates stand-alone applications, and JavaScript is a scripting language that has to be placed inside an HTML document to work. (Here’s a short article that explains the differences pretty well: http://www.dannyg.com/ref/javavsjavascript.html if you can ignore the comic sans-ish type face in the title.)
What really hurt JavaScript (besides the rather unfortunate name that is always confusing people) is that there were no standards early on. JavaScript would work completely differently in the different browsers. It was a nightmare to try to get your JavaScript to work right for all users. But now that they’ve started standardizing, it has started to become more popular again.