In this articles, we learn about JavaScript.

What is JavaScript:
- JavaScript is a light-weight object-oriented programming language when is used by several websites for scripting the webpages.
It is an interpreted, full-fledged programming language that enables dynamic interactivity on websites when applied to an HTML document.
- Although, JavaScript has no connectivity with Java programming language
- In addition to web browsers, databases such as CouchDB and MongoDB uses JavaScript as their scripting and query language.
Features of JavaScript:
- All popular web browsers support JavaScript as they provide built-in execution environments.
- JavaScript is an object-oriented programming language that uses prototypes rather than using classes for inheritance.
- It is a light-weighted and interpreted language.
- JavaScript code should be written in a script.
- Its case sensitive and always needs a semicolon.
- JavaScript is a dynamic language not static.
- Data types are inferred.
Application of JavaScript:
JavaScript is used to create interactive websites. It is mainly used for:
- Client-side validation,
- Dynamic drop-down menus,
- Displaying date and time,
- Displaying popup windows and dialog boxes (like an alert dialog box, confirm dialog box and prompt dialog box),
- Displaying clocks etc.
Example:
Program:
Output:
No comments:
Post a Comment