How can I prevent my javascript from Firebug view?So that I can prevent Hacking from Javascript?
You generally can't prevent people from seeing/debugging your js code. There are ways how to make their life miserable but please don't even think about it.
If you mean what Felix Kling thinks you mean, you can't. You can obfuscate it, but if you want the browser's Javascript interpreter to run it, it has to be readable by the browser, which makes it effectively public information.
That is impossible. The user will always have a means of executing javascript in the browser - if not using Firebug, then using the pseudo protocol handler javascript: in the address field.
You cannot prevent anyone to examine your JS when browsing your page.
The reason is simple: When you visit a web site, all its content (HTML, images, scripts, etc.) is downloaded to your machine in order to process and display it.
Once the data is downloaded, you can do what ever you want with it (if it is legal is another issue).
But you can make it more difficult for others to examine your JS code by obfuscating it.
See this question: How can I obfuscate JavaScript?
This might or might help. It won't stop those who really want to know.
The question is, is your code so valuable, dangerous or whatever that you really have to think about such stuff?