JavaScript is a light weight object oriented programming language used for scripting the webpages. It is an interpreted and full fledge programming language, used primarily by web browsers to provide dynamic and interactive experience for the end-user. Most of the functions and applications that make the Internet indispensable to modern life are coded in some form of JavaScript.
Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine. A JavaScript engine is a computer program that executes JavaScript(JS) code.
Uses of JavaScript:
1. Adding interactivity to website : If you want a website to be more than a static page of text, you will need to do some Java Scripting.
2. Developing mobile applications : JavaScript isn't just for website, it's used for those applications you have on your phone and tablet as well.
3. Creating web browser-based games : Ever played a game directly from your web browser. JavaScript probably helped make that happen.
4. Back end development : JavaScript is mostly used on the front end of the things but it's a versatile enough scripting language to be used on back end infrastructure, too.
5. Client-Side validation : JavaScript contains built in function to validate the data before it is sent to the server.
6. Event Handling : JavaScript helps to handle the event which occurs when end users interact with the webpages. Eg. onclick, onmouse over, on keydown and so on.
7. Building web servers and developing server applications : A web server can be created by using Node.js. Node.js is event-driven and not waits for the response of the previous call. The HTTP module can be used to create the server by using the createServer() method.
Features of JavaScript
- JavaScript is an object based scripting language.
- Giving the user more control over the browser
- It handles date and time
- It detects the user's browser and OS
- It is light weighted
- JavaScript is a scripting language and it is not Java.
- JavaScript is interpreter based scripting language.
- JavaScript is case sensitive.
- JavaScript is object based language as it provides predefined objects.
- Most of the JavaScript control statements syntax is same as syntax of control statements in C language.
- An important part of JavaScript is the ability to create new functions within scripts. Declare a function in JavaScript using function keyword.
Limitations of JavaScript
- Depends a lot on the browser
- Inability to use local devices
- JavaScript can be disabled
- Not Search Engine Friendly
- JavaScript cannot protect your page source or images
- It doesn't have any multithreading or multiprocessor capabilities
- For security reason, JavaScript doesnot allow the reading or writing of files
- It doesn't have any multiprocessor/multithreading capabilities.
- As there is no support available, this cannot be used for networking applications
- Cannot access webpages hosted on a different domain
- Cannot Access databases
If you have any doubt, let me know...